File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -48,22 +48,24 @@ func NewCommand() *cobra.Command {
48
48
}
49
49
50
50
func runCompletionCommand (cmd * cobra.Command , args []string ) {
51
+ stdOut , _ , res := feedback .OutputStreams ()
51
52
logrus .Info ("Executing `arduino-cli completion`" )
52
53
if completionNoDesc && (args [0 ] == "powershell" ) {
53
54
feedback .Fatal (tr ("Error: command description is not supported by %v" , args [0 ]), errorcodes .ErrGeneric )
54
55
}
55
56
switch args [0 ] {
56
57
case "bash" :
57
- cmd .Root ().GenBashCompletionV2 (os . Stdout , ! completionNoDesc )
58
+ cmd .Root ().GenBashCompletionV2 (stdOut , ! completionNoDesc )
58
59
case "zsh" :
59
60
if completionNoDesc {
60
- cmd .Root ().GenZshCompletionNoDesc (os . Stdout )
61
+ cmd .Root ().GenZshCompletionNoDesc (stdOut )
61
62
} else {
62
- cmd .Root ().GenZshCompletion (os . Stdout )
63
+ cmd .Root ().GenZshCompletion (stdOut )
63
64
}
64
65
case "fish" :
65
- cmd .Root ().GenFishCompletion (os . Stdout , ! completionNoDesc )
66
+ cmd .Root ().GenFishCompletion (stdOut , ! completionNoDesc )
66
67
case "powershell" :
67
- cmd .Root ().GenPowerShellCompletion (os . Stdout )
68
+ cmd .Root ().GenPowerShellCompletion (stdOut )
68
69
}
70
+ feedback .PrintResult (res ())
69
71
}
You can’t perform that action at this time.
0 commit comments