File tree 3 files changed +9
-10
lines changed
3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,14 @@ class FishCompletionOutput implements CompletionOutputInterface
21
21
{
22
22
public function write (CompletionSuggestions $ suggestions , OutputInterface $ output ): void
23
23
{
24
- $ values = $ suggestions ->getValueSuggestions ();
24
+ $ values = [];
25
+ foreach ($ suggestions ->getValueSuggestions () as $ value ) {
26
+ $ values [] = $ value ->getValue ().($ value ->getDescription () ? "\t" .$ value ->getDescription () : '' );
27
+ }
25
28
foreach ($ suggestions ->getOptionSuggestions () as $ option ) {
26
- $ values [] = '-- ' .$ option ->getName ();
29
+ $ values [] = '-- ' .$ option ->getName ().( $ option -> getDescription () ? "\t" . $ option -> getDescription () : '' ) ;
27
30
if ($ option ->isNegatable ()) {
28
- $ values [] = '--no- ' .$ option ->getName ();
31
+ $ values [] = '--no- ' .$ option ->getName ().( $ option -> getDescription () ? "\t" . $ option -> getDescription () : '' ) ;
29
32
}
30
33
}
31
34
$ output ->write (implode ("\n" , $ values ));
Original file line number Diff line number Diff line change @@ -19,11 +19,7 @@ function _sf_{{ COMMAND_NAME }}
19
19
20
20
set completecmd $completecmd " -c$c "
21
21
22
- set sfcomplete ($completecmd )
23
-
24
- for i in $sfcomplete
25
- echo $i
26
- end
22
+ $completecmd
27
23
end
28
24
29
25
complete -c ' {{ COMMAND_NAME }}' -a ' (_sf_{{ COMMAND_NAME }})' -f
Original file line number Diff line number Diff line change @@ -23,11 +23,11 @@ public function getCompletionOutput(): CompletionOutputInterface
23
23
24
24
public function getExpectedOptionsOutput (): string
25
25
{
26
- return "--option1 \n--negatable \n--no-negatable " ;
26
+ return "--option1 \t First Option \ n--negatable \t Can be negative \ n--no-negatable \t Can be negative " ;
27
27
}
28
28
29
29
public function getExpectedValuesOutput (): string
30
30
{
31
- return "Green \nRed \nYellow " ;
31
+ return "Green \t Beans are green \ nRed \t Rose are red \ nYellow \t Canaries are yellow " ;
32
32
}
33
33
}
You can’t perform that action at this time.
0 commit comments