@@ -14,7 +14,7 @@ func (*RootCmd) completion() *serpent.Command {
14
14
shellOptions := completion .ShellOptions (& shellName )
15
15
return & serpent.Command {
16
16
Use :"completion" ,
17
- Short :"Install shell completion scripts for the detected shell." ,
17
+ Short :"Installor update shell completion scripts for the detected shell." ,
18
18
Options : []serpent.Option {
19
19
{
20
20
Flag :"shell" ,
@@ -67,20 +67,16 @@ func (*RootCmd) completion() *serpent.Command {
67
67
func installCompletion (inv * serpent.Invocation ,shell completion.Shell )error {
68
68
path ,err := shell .InstallPath ()
69
69
if err != nil {
70
- // If we can't determinethe install path, just print the completion script.
70
+ cliui . Error ( inv . Stderr , fmt . Sprintf ( "Failed to determinecompletion path %v" , err ))
71
71
return shell .WriteCompletion (inv .Stdout )
72
72
}
73
- action := "appending to"
74
- if shell .UsesOwnFile () {
75
- action = "creating"
76
- }
77
73
choice ,err := cliui .Select (inv , cliui.SelectOptions {
78
74
Options : []string {
79
75
"Confirm" ,
80
76
"Print to terminal" ,
81
77
"Cancel" ,
82
78
},
83
- Message :fmt .Sprintf ("Install completion for %sby %s %s ?" ,shell .Name (), action ,path ),
79
+ Message :fmt .Sprintf ("Install completion for %sat %s?" ,shell .Name (),path ),
84
80
HideSearch :true ,
85
81
})
86
82
if err != nil {