Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf85a92b

Browse files
committed
fixup
1 parentc69e2c2 commitf85a92b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

‎cli/completion.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func (*RootCmd) completion() *serpent.Command {
1414
shellOptions:=completion.ShellOptions(&shellName)
1515
return&serpent.Command{
1616
Use:"completion",
17-
Short:"Install shell completion scripts for the detected shell.",
17+
Short:"Installor updateshell completion scripts for the detected shell.",
1818
Options: []serpent.Option{
1919
{
2020
Flag:"shell",
@@ -67,20 +67,16 @@ func (*RootCmd) completion() *serpent.Command {
6767
funcinstallCompletion(inv*serpent.Invocation,shell completion.Shell)error {
6868
path,err:=shell.InstallPath()
6969
iferr!=nil {
70-
// If we can'tdeterminethe installpath, just print the completion script.
70+
cliui.Error(inv.Stderr,fmt.Sprintf("Failed todeterminecompletionpath %v",err))
7171
returnshell.WriteCompletion(inv.Stdout)
7272
}
73-
action:="appending to"
74-
ifshell.UsesOwnFile() {
75-
action="creating"
76-
}
7773
choice,err:=cliui.Select(inv, cliui.SelectOptions{
7874
Options: []string{
7975
"Confirm",
8076
"Print to terminal",
8177
"Cancel",
8278
},
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),
8480
HideSearch:true,
8581
})
8682
iferr!=nil {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp