aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2025-10-27 23:04:55 -0700
committerchrislu <chris.lu@gmail.com>2025-10-27 23:04:55 -0700
commitb7ba6785a2252f7a9c0e5192431b97e384034771 (patch)
treeb63b42437212683ba6583736030c8cf915421a86 /weed/command
parent208d7f24f46fead096fd92432b90ebee7c406216 (diff)
downloadseaweedfs-b7ba6785a2252f7a9c0e5192431b97e384034771.tar.xz
seaweedfs-b7ba6785a2252f7a9c0e5192431b97e384034771.zip
go fmt
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/autocomplete.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/weed/command/autocomplete.go b/weed/command/autocomplete.go
index d9e4c6b04..6a74311dc 100644
--- a/weed/command/autocomplete.go
+++ b/weed/command/autocomplete.go
@@ -2,11 +2,11 @@ package command
import (
"fmt"
- "os"
- "path/filepath"
"github.com/posener/complete"
completeinstall "github.com/posener/complete/cmd/install"
flag "github.com/seaweedfs/seaweedfs/weed/util/fla9"
+ "os"
+ "path/filepath"
"runtime"
)
@@ -53,14 +53,14 @@ func printAutocompleteScript(shell string) bool {
return false
}
- switch shell {
- case "bash":
- fmt.Printf("complete -C %q weed\n", binPath)
- case "zsh":
- fmt.Printf("autoload -U +X bashcompinit && bashcompinit\n")
- fmt.Printf("complete -o nospace -C %q weed\n", binPath)
- case "fish":
- fmt.Printf(`function __complete_weed
+ switch shell {
+ case "bash":
+ fmt.Printf("complete -C %q weed\n", binPath)
+ case "zsh":
+ fmt.Printf("autoload -U +X bashcompinit && bashcompinit\n")
+ fmt.Printf("complete -o nospace -C %q weed\n", binPath)
+ case "fish":
+ fmt.Printf(`function __complete_weed
set -lx COMP_LINE (commandline -cp)
test -z (commandline -ct)
and set COMP_LINE "$COMP_LINE "
@@ -68,10 +68,10 @@ func printAutocompleteScript(shell string) bool {
end
complete -f -c weed -a "(__complete_weed)"
`, binPath)
- default:
- fmt.Fprintf(os.Stderr, "unsupported shell: %s. Supported shells: bash, zsh, fish\n", shell)
- return false
- }
+ default:
+ fmt.Fprintf(os.Stderr, "unsupported shell: %s. Supported shells: bash, zsh, fish\n", shell)
+ return false
+ }
return true
}