support/rg/_rg.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209

using namespace System.Management.Automation
using namespace System.Management.Automation.Language

Register-ArgumentCompleter -Native -CommandName 'rg' -ScriptBlock {
    param($wordToComplete, $commandAst, $cursorPosition)

    $commandElements = $commandAst.CommandElements
    $command = @(
        'rg'
        for ($i = 1; $i -lt $commandElements.Count; $i++) {
            $element = $commandElements[$i]
            if ($element -isnot [StringConstantExpressionAst] -or
                $element.StringConstantType -ne [StringConstantType]::BareWord -or
                $element.Value.StartsWith('-')) {
                break
        }
        $element.Value
    }) -join ';'

    $completions = @(switch ($command) {
        'rg' {
            [CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Show NUM lines after each match.')
            [CompletionResult]::new('--after-context', 'after-context', [CompletionResultType]::ParameterName, 'Show NUM lines after each match.')
            [CompletionResult]::new('-B', 'B', [CompletionResultType]::ParameterName, 'Show NUM lines before each match.')
            [CompletionResult]::new('--before-context', 'before-context', [CompletionResultType]::ParameterName, 'Show NUM lines before each match.')
            [CompletionResult]::new('--color', 'color', [CompletionResultType]::ParameterName, 'Controls when to use color.')
            [CompletionResult]::new('--colors', 'colors', [CompletionResultType]::ParameterName, 'Configure color settings and styles.')
            [CompletionResult]::new('-C', 'C', [CompletionResultType]::ParameterName, 'Show NUM lines before and after each match.')
            [CompletionResult]::new('--context', 'context', [CompletionResultType]::ParameterName, 'Show NUM lines before and after each match.')
            [CompletionResult]::new('--context-separator', 'context-separator', [CompletionResultType]::ParameterName, 'Set the context separator string.')
            [CompletionResult]::new('--dfa-size-limit', 'dfa-size-limit', [CompletionResultType]::ParameterName, 'The upper size limit of the regex DFA.')
            [CompletionResult]::new('-E', 'E', [CompletionResultType]::ParameterName, 'Specify the text encoding of files to search.')
            [CompletionResult]::new('--encoding', 'encoding', [CompletionResultType]::ParameterName, 'Specify the text encoding of files to search.')
            [CompletionResult]::new('--engine', 'engine', [CompletionResultType]::ParameterName, 'Specify which regexp engine to use.')
            [CompletionResult]::new('--field-context-separator', 'field-context-separator', [CompletionResultType]::ParameterName, 'Set the field context separator.')
            [CompletionResult]::new('--field-match-separator', 'field-match-separator', [CompletionResultType]::ParameterName, 'Set the match separator.')
            [CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'Search for patterns from the given file.')
            [CompletionResult]::new('--file', 'file', [CompletionResultType]::ParameterName, 'Search for patterns from the given file.')
            [CompletionResult]::new('-g', 'g', [CompletionResultType]::ParameterName, 'Include or exclude files.')
            [CompletionResult]::new('--glob', 'glob', [CompletionResultType]::ParameterName, 'Include or exclude files.')
            [CompletionResult]::new('--iglob', 'iglob', [CompletionResultType]::ParameterName, 'Include or exclude files case insensitively.')
            [CompletionResult]::new('--ignore-file', 'ignore-file', [CompletionResultType]::ParameterName, 'Specify additional ignore files.')
            [CompletionResult]::new('-M', 'M', [CompletionResultType]::ParameterName, 'Don''t print lines longer than this limit.')
            [CompletionResult]::new('--max-columns', 'max-columns', [CompletionResultType]::ParameterName, 'Don''t print lines longer than this limit.')
            [CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'Limit the number of matches.')
            [CompletionResult]::new('--max-count', 'max-count', [CompletionResultType]::ParameterName, 'Limit the number of matches.')
            [CompletionResult]::new('--max-depth', 'max-depth', [CompletionResultType]::ParameterName, 'Descend at most NUM directories.')
            [CompletionResult]::new('--max-filesize', 'max-filesize', [CompletionResultType]::ParameterName, 'Ignore files larger than NUM in size.')
            [CompletionResult]::new('--path-separator', 'path-separator', [CompletionResultType]::ParameterName, 'Set the path separator.')
            [CompletionResult]::new('--pre', 'pre', [CompletionResultType]::ParameterName, 'search outputs of COMMAND FILE for each FILE')
            [CompletionResult]::new('--pre-glob', 'pre-glob', [CompletionResultType]::ParameterName, 'Include or exclude files from a preprocessing command.')
            [CompletionResult]::new('--regex-size-limit', 'regex-size-limit', [CompletionResultType]::ParameterName, 'The upper size limit of the compiled regex.')
            [CompletionResult]::new('-e', 'e', [CompletionResultType]::ParameterName, 'A pattern to search for.')
            [CompletionResult]::new('--regexp', 'regexp', [CompletionResultType]::ParameterName, 'A pattern to search for.')
            [CompletionResult]::new('-r', 'r', [CompletionResultType]::ParameterName, 'Replace matches with the given text.')
            [CompletionResult]::new('--replace', 'replace', [CompletionResultType]::ParameterName, 'Replace matches with the given text.')
            [CompletionResult]::new('--sort', 'sort', [CompletionResultType]::ParameterName, 'Sort results in ascending order. Implies --threads=1.')
            [CompletionResult]::new('--sortr', 'sortr', [CompletionResultType]::ParameterName, 'Sort results in descending order. Implies --threads=1.')
            [CompletionResult]::new('-j', 'j', [CompletionResultType]::ParameterName, 'The approximate number of threads to use.')
            [CompletionResult]::new('--threads', 'threads', [CompletionResultType]::ParameterName, 'The approximate number of threads to use.')
            [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'Only search files matching TYPE.')
            [CompletionResult]::new('--type', 'type', [CompletionResultType]::ParameterName, 'Only search files matching TYPE.')
            [CompletionResult]::new('--type-add', 'type-add', [CompletionResultType]::ParameterName, 'Add a new glob for a file type.')
            [CompletionResult]::new('--type-clear', 'type-clear', [CompletionResultType]::ParameterName, 'Clear globs for a file type.')
            [CompletionResult]::new('-T', 'T', [CompletionResultType]::ParameterName, 'Do not search files matching TYPE.')
            [CompletionResult]::new('--type-not', 'type-not', [CompletionResultType]::ParameterName, 'Do not search files matching TYPE.')
            [CompletionResult]::new('--auto-hybrid-regex', 'auto-hybrid-regex', [CompletionResultType]::ParameterName, 'Dynamically use PCRE2 if necessary.')
            [CompletionResult]::new('--no-auto-hybrid-regex', 'no-auto-hybrid-regex', [CompletionResultType]::ParameterName, 'no-auto-hybrid-regex')
            [CompletionResult]::new('--binary', 'binary', [CompletionResultType]::ParameterName, 'Search binary files.')
            [CompletionResult]::new('--no-binary', 'no-binary', [CompletionResultType]::ParameterName, 'no-binary')
            [CompletionResult]::new('--block-buffered', 'block-buffered', [CompletionResultType]::ParameterName, 'Force block buffering.')
            [CompletionResult]::new('--no-block-buffered', 'no-block-buffered', [CompletionResultType]::ParameterName, 'no-block-buffered')
            [CompletionResult]::new('-b', 'b', [CompletionResultType]::ParameterName, 'Print the 0-based byte offset for each matching line.')
            [CompletionResult]::new('--byte-offset', 'byte-offset', [CompletionResultType]::ParameterName, 'Print the 0-based byte offset for each matching line.')
            [CompletionResult]::new('-s', 's', [CompletionResultType]::ParameterName, 'Search case sensitively (default).')
            [CompletionResult]::new('--case-sensitive', 'case-sensitive', [CompletionResultType]::ParameterName, 'Search case sensitively (default).')
            [CompletionResult]::new('--column', 'column', [CompletionResultType]::ParameterName, 'Show column numbers.')
            [CompletionResult]::new('--no-column', 'no-column', [CompletionResultType]::ParameterName, 'no-column')
            [CompletionResult]::new('--no-context-separator', 'no-context-separator', [CompletionResultType]::ParameterName, 'no-context-separator')
            [CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Only show the count of matching lines for each file.')
            [CompletionResult]::new('--count', 'count', [CompletionResultType]::ParameterName, 'Only show the count of matching lines for each file.')
            [CompletionResult]::new('--count-matches', 'count-matches', [CompletionResultType]::ParameterName, 'Only show the count of individual matches for each file.')
            [CompletionResult]::new('--crlf', 'crlf', [CompletionResultType]::ParameterName, 'Support CRLF line terminators (useful on Windows).')
            [CompletionResult]::new('--no-crlf', 'no-crlf', [CompletionResultType]::ParameterName, 'no-crlf')
            [CompletionResult]::new('--debug', 'debug', [CompletionResultType]::ParameterName, 'Show debug messages.')
            [CompletionResult]::new('--trace', 'trace', [CompletionResultType]::ParameterName, 'trace')
            [CompletionResult]::new('--no-encoding', 'no-encoding', [CompletionResultType]::ParameterName, 'no-encoding')
            [CompletionResult]::new('--files', 'files', [CompletionResultType]::ParameterName, 'Print each file that would be searched.')
            [CompletionResult]::new('-l', 'l', [CompletionResultType]::ParameterName, 'Print the paths with at least one match.')
            [CompletionResult]::new('--files-with-matches', 'files-with-matches', [CompletionResultType]::ParameterName, 'Print the paths with at least one match.')
            [CompletionResult]::new('--files-without-match', 'files-without-match', [CompletionResultType]::ParameterName, 'Print the paths that contain zero matches.')
            [CompletionResult]::new('-F', 'F', [CompletionResultType]::ParameterName, 'Treat the pattern as a literal string.')
            [CompletionResult]::new('--fixed-strings', 'fixed-strings', [CompletionResultType]::ParameterName, 'Treat the pattern as a literal string.')
            [CompletionResult]::new('--no-fixed-strings', 'no-fixed-strings', [CompletionResultType]::ParameterName, 'no-fixed-strings')
            [CompletionResult]::new('-L', 'L', [CompletionResultType]::ParameterName, 'Follow symbolic links.')
            [CompletionResult]::new('--follow', 'follow', [CompletionResultType]::ParameterName, 'Follow symbolic links.')
            [CompletionResult]::new('--no-follow', 'no-follow', [CompletionResultType]::ParameterName, 'no-follow')
            [CompletionResult]::new('--glob-case-insensitive', 'glob-case-insensitive', [CompletionResultType]::ParameterName, 'Process all glob patterns case insensitively.')
            [CompletionResult]::new('--no-glob-case-insensitive', 'no-glob-case-insensitive', [CompletionResultType]::ParameterName, 'no-glob-case-insensitive')
            [CompletionResult]::new('--heading', 'heading', [CompletionResultType]::ParameterName, 'Print matches grouped by each file.')
            [CompletionResult]::new('--no-heading', 'no-heading', [CompletionResultType]::ParameterName, 'Don''t group matches by each file.')
            [CompletionResult]::new('-.', '.', [CompletionResultType]::ParameterName, 'Search hidden files and directories.')
            [CompletionResult]::new('--hidden', 'hidden', [CompletionResultType]::ParameterName, 'Search hidden files and directories.')
            [CompletionResult]::new('--no-hidden', 'no-hidden', [CompletionResultType]::ParameterName, 'no-hidden')
            [CompletionResult]::new('-i', 'i', [CompletionResultType]::ParameterName, 'Case insensitive search.')
            [CompletionResult]::new('--ignore-case', 'ignore-case', [CompletionResultType]::ParameterName, 'Case insensitive search.')
            [CompletionResult]::new('--ignore-file-case-insensitive', 'ignore-file-case-insensitive', [CompletionResultType]::ParameterName, 'Process ignore files case insensitively.')
            [CompletionResult]::new('--no-ignore-file-case-insensitive', 'no-ignore-file-case-insensitive', [CompletionResultType]::ParameterName, 'no-ignore-file-case-insensitive')
            [CompletionResult]::new('--include-zero', 'include-zero', [CompletionResultType]::ParameterName, 'Include files with zero matches in summary')
            [CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, 'Invert matching.')
            [CompletionResult]::new('--invert-match', 'invert-match', [CompletionResultType]::ParameterName, 'Invert matching.')
            [CompletionResult]::new('--json', 'json', [CompletionResultType]::ParameterName, 'Show search results in a JSON Lines format.')
            [CompletionResult]::new('--no-json', 'no-json', [CompletionResultType]::ParameterName, 'no-json')
            [CompletionResult]::new('--line-buffered', 'line-buffered', [CompletionResultType]::ParameterName, 'Force line buffering.')
            [CompletionResult]::new('--no-line-buffered', 'no-line-buffered', [CompletionResultType]::ParameterName, 'no-line-buffered')
            [CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Show line numbers.')
            [CompletionResult]::new('--line-number', 'line-number', [CompletionResultType]::ParameterName, 'Show line numbers.')
            [CompletionResult]::new('-N', 'N', [CompletionResultType]::ParameterName, 'Suppress line numbers.')
            [CompletionResult]::new('--no-line-number', 'no-line-number', [CompletionResultType]::ParameterName, 'Suppress line numbers.')
            [CompletionResult]::new('-x', 'x', [CompletionResultType]::ParameterName, 'Only show matches surrounded by line boundaries.')
            [CompletionResult]::new('--line-regexp', 'line-regexp', [CompletionResultType]::ParameterName, 'Only show matches surrounded by line boundaries.')
            [CompletionResult]::new('--max-columns-preview', 'max-columns-preview', [CompletionResultType]::ParameterName, 'Print a preview for lines exceeding the limit.')
            [CompletionResult]::new('--no-max-columns-preview', 'no-max-columns-preview', [CompletionResultType]::ParameterName, 'no-max-columns-preview')
            [CompletionResult]::new('--mmap', 'mmap', [CompletionResultType]::ParameterName, 'Search using memory maps when possible.')
            [CompletionResult]::new('--no-mmap', 'no-mmap', [CompletionResultType]::ParameterName, 'Never use memory maps.')
            [CompletionResult]::new('-U', 'U', [CompletionResultType]::ParameterName, 'Enable matching across multiple lines.')
            [CompletionResult]::new('--multiline', 'multiline', [CompletionResultType]::ParameterName, 'Enable matching across multiple lines.')
            [CompletionResult]::new('--no-multiline', 'no-multiline', [CompletionResultType]::ParameterName, 'no-multiline')
            [CompletionResult]::new('--multiline-dotall', 'multiline-dotall', [CompletionResultType]::ParameterName, 'Make ''.'' match new lines when multiline is enabled.')
            [CompletionResult]::new('--no-multiline-dotall', 'no-multiline-dotall', [CompletionResultType]::ParameterName, 'no-multiline-dotall')
            [CompletionResult]::new('--no-config', 'no-config', [CompletionResultType]::ParameterName, 'Never read configuration files.')
            [CompletionResult]::new('--no-ignore', 'no-ignore', [CompletionResultType]::ParameterName, 'Don''t respect ignore files.')
            [CompletionResult]::new('--ignore', 'ignore', [CompletionResultType]::ParameterName, 'ignore')
            [CompletionResult]::new('--no-ignore-dot', 'no-ignore-dot', [CompletionResultType]::ParameterName, 'Don''t respect .ignore files.')
            [CompletionResult]::new('--ignore-dot', 'ignore-dot', [CompletionResultType]::ParameterName, 'ignore-dot')
            [CompletionResult]::new('--no-ignore-exclude', 'no-ignore-exclude', [CompletionResultType]::ParameterName, 'Don''t respect local exclusion files.')
            [CompletionResult]::new('--ignore-exclude', 'ignore-exclude', [CompletionResultType]::ParameterName, 'ignore-exclude')
            [CompletionResult]::new('--no-ignore-files', 'no-ignore-files', [CompletionResultType]::ParameterName, 'Don''t respect --ignore-file arguments.')
            [CompletionResult]::new('--ignore-files', 'ignore-files', [CompletionResultType]::ParameterName, 'ignore-files')
            [CompletionResult]::new('--no-ignore-global', 'no-ignore-global', [CompletionResultType]::ParameterName, 'Don''t respect global ignore files.')
            [CompletionResult]::new('--ignore-global', 'ignore-global', [CompletionResultType]::ParameterName, 'ignore-global')
            [CompletionResult]::new('--no-ignore-messages', 'no-ignore-messages', [CompletionResultType]::ParameterName, 'Suppress gitignore parse error messages.')
            [CompletionResult]::new('--ignore-messages', 'ignore-messages', [CompletionResultType]::ParameterName, 'ignore-messages')
            [CompletionResult]::new('--no-ignore-parent', 'no-ignore-parent', [CompletionResultType]::ParameterName, 'Don''t respect ignore files in parent directories.')
            [CompletionResult]::new('--ignore-parent', 'ignore-parent', [CompletionResultType]::ParameterName, 'ignore-parent')
            [CompletionResult]::new('--no-ignore-vcs', 'no-ignore-vcs', [CompletionResultType]::ParameterName, 'Don''t respect VCS ignore files.')
            [CompletionResult]::new('--ignore-vcs', 'ignore-vcs', [CompletionResultType]::ParameterName, 'ignore-vcs')
            [CompletionResult]::new('--no-messages', 'no-messages', [CompletionResultType]::ParameterName, 'Suppress some error messages.')
            [CompletionResult]::new('--messages', 'messages', [CompletionResultType]::ParameterName, 'messages')
            [CompletionResult]::new('--no-pcre2-unicode', 'no-pcre2-unicode', [CompletionResultType]::ParameterName, 'Disable Unicode mode for PCRE2 matching.')
            [CompletionResult]::new('--pcre2-unicode', 'pcre2-unicode', [CompletionResultType]::ParameterName, 'pcre2-unicode')
            [CompletionResult]::new('--no-require-git', 'no-require-git', [CompletionResultType]::ParameterName, 'Do not require a git repository to use gitignores.')
            [CompletionResult]::new('--require-git', 'require-git', [CompletionResultType]::ParameterName, 'require-git')
            [CompletionResult]::new('--no-unicode', 'no-unicode', [CompletionResultType]::ParameterName, 'Disable Unicode mode.')
            [CompletionResult]::new('--unicode', 'unicode', [CompletionResultType]::ParameterName, 'unicode')
            [CompletionResult]::new('-0', '0', [CompletionResultType]::ParameterName, 'Print a NUL byte after file paths.')
            [CompletionResult]::new('--null', 'null', [CompletionResultType]::ParameterName, 'Print a NUL byte after file paths.')
            [CompletionResult]::new('--null-data', 'null-data', [CompletionResultType]::ParameterName, 'Use NUL as a line terminator instead of \n.')
            [CompletionResult]::new('--one-file-system', 'one-file-system', [CompletionResultType]::ParameterName, 'Do not descend into directories on other file systems.')
            [CompletionResult]::new('--no-one-file-system', 'no-one-file-system', [CompletionResultType]::ParameterName, 'no-one-file-system')
            [CompletionResult]::new('-o', 'o', [CompletionResultType]::ParameterName, 'Print only matched parts of a line.')
            [CompletionResult]::new('--only-matching', 'only-matching', [CompletionResultType]::ParameterName, 'Print only matched parts of a line.')
            [CompletionResult]::new('--passthru', 'passthru', [CompletionResultType]::ParameterName, 'Print both matching and non-matching lines.')
            [CompletionResult]::new('-P', 'P', [CompletionResultType]::ParameterName, 'Enable PCRE2 matching.')
            [CompletionResult]::new('--pcre2', 'pcre2', [CompletionResultType]::ParameterName, 'Enable PCRE2 matching.')
            [CompletionResult]::new('--no-pcre2', 'no-pcre2', [CompletionResultType]::ParameterName, 'no-pcre2')
            [CompletionResult]::new('--pcre2-version', 'pcre2-version', [CompletionResultType]::ParameterName, 'Print the version of PCRE2 that ripgrep uses.')
            [CompletionResult]::new('--no-pre', 'no-pre', [CompletionResultType]::ParameterName, 'no-pre')
            [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Alias for --color always --heading --line-number.')
            [CompletionResult]::new('--pretty', 'pretty', [CompletionResultType]::ParameterName, 'Alias for --color always --heading --line-number.')
            [CompletionResult]::new('-q', 'q', [CompletionResultType]::ParameterName, 'Do not print anything to stdout.')
            [CompletionResult]::new('--quiet', 'quiet', [CompletionResultType]::ParameterName, 'Do not print anything to stdout.')
            [CompletionResult]::new('-z', 'z', [CompletionResultType]::ParameterName, 'Search in compressed files.')
            [CompletionResult]::new('--search-zip', 'search-zip', [CompletionResultType]::ParameterName, 'Search in compressed files.')
            [CompletionResult]::new('--no-search-zip', 'no-search-zip', [CompletionResultType]::ParameterName, 'no-search-zip')
            [CompletionResult]::new('-S', 'S', [CompletionResultType]::ParameterName, 'Smart case search.')
            [CompletionResult]::new('--smart-case', 'smart-case', [CompletionResultType]::ParameterName, 'Smart case search.')
            [CompletionResult]::new('--sort-files', 'sort-files', [CompletionResultType]::ParameterName, 'DEPRECATED')
            [CompletionResult]::new('--no-sort-files', 'no-sort-files', [CompletionResultType]::ParameterName, 'no-sort-files')
            [CompletionResult]::new('--stats', 'stats', [CompletionResultType]::ParameterName, 'Print statistics about this ripgrep search.')
            [CompletionResult]::new('--no-stats', 'no-stats', [CompletionResultType]::ParameterName, 'no-stats')
            [CompletionResult]::new('-a', 'a', [CompletionResultType]::ParameterName, 'Search binary files as if they were text.')
            [CompletionResult]::new('--text', 'text', [CompletionResultType]::ParameterName, 'Search binary files as if they were text.')
            [CompletionResult]::new('--no-text', 'no-text', [CompletionResultType]::ParameterName, 'no-text')
            [CompletionResult]::new('--trim', 'trim', [CompletionResultType]::ParameterName, 'Trim prefixed whitespace from matches.')
            [CompletionResult]::new('--no-trim', 'no-trim', [CompletionResultType]::ParameterName, 'no-trim')
            [CompletionResult]::new('--type-list', 'type-list', [CompletionResultType]::ParameterName, 'Show all supported file types.')
            [CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Reduce the level of "smart" searching.')
            [CompletionResult]::new('--unrestricted', 'unrestricted', [CompletionResultType]::ParameterName, 'Reduce the level of "smart" searching.')
            [CompletionResult]::new('--vimgrep', 'vimgrep', [CompletionResultType]::ParameterName, 'Show results in vim compatible format.')
            [CompletionResult]::new('-H', 'H', [CompletionResultType]::ParameterName, 'Print the file path with the matched lines.')
            [CompletionResult]::new('--with-filename', 'with-filename', [CompletionResultType]::ParameterName, 'Print the file path with the matched lines.')
            [CompletionResult]::new('-I', 'I', [CompletionResultType]::ParameterName, 'Never print the file path with the matched lines.')
            [CompletionResult]::new('--no-filename', 'no-filename', [CompletionResultType]::ParameterName, 'Never print the file path with the matched lines.')
            [CompletionResult]::new('-w', 'w', [CompletionResultType]::ParameterName, 'Only show matches surrounded by word boundaries.')
            [CompletionResult]::new('--word-regexp', 'word-regexp', [CompletionResultType]::ParameterName, 'Only show matches surrounded by word boundaries.')
            [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information. Use --help for more details.')
            [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information. Use --help for more details.')
            [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
            [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
            break
        }
    })

    $completions.Where{ $_.CompletionText -like "$wordToComplete*" } |
        Sort-Object -Property ListItemText
}