@@ -22,12 +22,12 @@ Register-ArgumentCompleter -Native -CommandName 'my-app' -ScriptBlock {
22
22
$completions = @ (switch ($command ) {
23
23
' my-app' {
24
24
[CompletionResult ]::new(' -c' , ' c' , [CompletionResultType ]::ParameterName, ' some config file' )
25
- [CompletionResult ]::new(' -C' , ' C' , [CompletionResultType ]::ParameterName, ' some config file' )
25
+ [CompletionResult ]::new(' -C' , ' C ' , [CompletionResultType ]::ParameterName, ' some config file' )
26
26
[CompletionResult ]::new(' --config' , ' config' , [CompletionResultType ]::ParameterName, ' some config file' )
27
27
[CompletionResult ]::new(' --conf' , ' conf' , [CompletionResultType ]::ParameterName, ' some config file' )
28
28
[CompletionResult ]::new(' -h' , ' h' , [CompletionResultType ]::ParameterName, ' Print help' )
29
29
[CompletionResult ]::new(' --help' , ' help' , [CompletionResultType ]::ParameterName, ' Print help' )
30
- [CompletionResult ]::new(' -V' , ' V' , [CompletionResultType ]::ParameterName, ' Print version' )
30
+ [CompletionResult ]::new(' -V' , ' V ' , [CompletionResultType ]::ParameterName, ' Print version' )
31
31
[CompletionResult ]::new(' --version' , ' version' , [CompletionResultType ]::ParameterName, ' Print version' )
32
32
[CompletionResult ]::new(' test' , ' test' , [CompletionResultType ]::ParameterValue, ' tests things' )
33
33
[CompletionResult ]::new(' some_cmd' , ' some_cmd' , [CompletionResultType ]::ParameterValue, ' tests other things' )
@@ -40,29 +40,29 @@ Register-ArgumentCompleter -Native -CommandName 'my-app' -ScriptBlock {
40
40
[CompletionResult ]::new(' --case' , ' case' , [CompletionResultType ]::ParameterName, ' the case to test' )
41
41
[CompletionResult ]::new(' -h' , ' h' , [CompletionResultType ]::ParameterName, ' Print help' )
42
42
[CompletionResult ]::new(' --help' , ' help' , [CompletionResultType ]::ParameterName, ' Print help' )
43
- [CompletionResult ]::new(' -V' , ' V' , [CompletionResultType ]::ParameterName, ' Print version' )
43
+ [CompletionResult ]::new(' -V' , ' V ' , [CompletionResultType ]::ParameterName, ' Print version' )
44
44
[CompletionResult ]::new(' --version' , ' version' , [CompletionResultType ]::ParameterName, ' Print version' )
45
45
break
46
46
}
47
47
' my-app;some_cmd' {
48
48
[CompletionResult ]::new(' --config' , ' config' , [CompletionResultType ]::ParameterName, ' the other case to test' )
49
49
[CompletionResult ]::new(' -h' , ' h' , [CompletionResultType ]::ParameterName, ' Print help' )
50
50
[CompletionResult ]::new(' --help' , ' help' , [CompletionResultType ]::ParameterName, ' Print help' )
51
- [CompletionResult ]::new(' -V' , ' V' , [CompletionResultType ]::ParameterName, ' Print version' )
51
+ [CompletionResult ]::new(' -V' , ' V ' , [CompletionResultType ]::ParameterName, ' Print version' )
52
52
[CompletionResult ]::new(' --version' , ' version' , [CompletionResultType ]::ParameterName, ' Print version' )
53
53
break
54
54
}
55
55
' my-app;some-cmd-with-hyphens' {
56
56
[CompletionResult ]::new(' -h' , ' h' , [CompletionResultType ]::ParameterName, ' Print help' )
57
57
[CompletionResult ]::new(' --help' , ' help' , [CompletionResultType ]::ParameterName, ' Print help' )
58
- [CompletionResult ]::new(' -V' , ' V' , [CompletionResultType ]::ParameterName, ' Print version' )
58
+ [CompletionResult ]::new(' -V' , ' V ' , [CompletionResultType ]::ParameterName, ' Print version' )
59
59
[CompletionResult ]::new(' --version' , ' version' , [CompletionResultType ]::ParameterName, ' Print version' )
60
60
break
61
61
}
62
62
' my-app;some-hidden-cmd' {
63
63
[CompletionResult ]::new(' -h' , ' h' , [CompletionResultType ]::ParameterName, ' Print help' )
64
64
[CompletionResult ]::new(' --help' , ' help' , [CompletionResultType ]::ParameterName, ' Print help' )
65
- [CompletionResult ]::new(' -V' , ' V' , [CompletionResultType ]::ParameterName, ' Print version' )
65
+ [CompletionResult ]::new(' -V' , ' V ' , [CompletionResultType ]::ParameterName, ' Print version' )
66
66
[CompletionResult ]::new(' --version' , ' version' , [CompletionResultType ]::ParameterName, ' Print version' )
67
67
break
68
68
}
0 commit comments