50 lines
1.3 KiB
Diff
50 lines
1.3 KiB
Diff
diff --git a/cmd/autocomplete.go b/cmd/autocomplete.go
|
|
index 4c0ab1a..7e9b0a4 100644
|
|
--- a/cmd/autocomplete.go
|
|
+++ b/cmd/autocomplete.go
|
|
@@ -122,6 +122,9 @@ func writeFishAutoCompleteFile(ctx *cli.Context) error {
|
|
return err
|
|
}
|
|
|
|
+ _, status := io.WriteString(os.Stdout, script)
|
|
+ return status
|
|
+
|
|
localPath, err := xdg.ConfigFile("fish/conf.d/tea_completion.fish")
|
|
if err != nil {
|
|
return err
|
|
diff --git a/contrib/autocomplete.sh b/contrib/autocomplete.sh
|
|
index f0f6241..17f7ce1 100644
|
|
--- a/contrib/autocomplete.sh
|
|
+++ b/contrib/autocomplete.sh
|
|
@@ -1,7 +1,5 @@
|
|
#! /bin/bash
|
|
|
|
-: ${PROG:=$(basename ${BASH_SOURCE})}
|
|
-
|
|
_cli_bash_autocomplete() {
|
|
if [[ "${COMP_WORDS[0]}" != "source" ]]; then
|
|
local cur opts base
|
|
@@ -17,5 +15,4 @@ _cli_bash_autocomplete() {
|
|
fi
|
|
}
|
|
|
|
-complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete $PROG
|
|
-unset PROG
|
|
+complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete tea
|
|
diff --git a/contrib/autocomplete.zsh b/contrib/autocomplete.zsh
|
|
index cf39c88..f718c0a 100644
|
|
--- a/contrib/autocomplete.zsh
|
|
+++ b/contrib/autocomplete.zsh
|
|
@@ -1,4 +1,4 @@
|
|
-#compdef $PROG
|
|
+#compdef tea
|
|
|
|
_cli_zsh_autocomplete() {
|
|
|
|
@@ -20,4 +20,4 @@ _cli_zsh_autocomplete() {
|
|
return
|
|
}
|
|
|
|
-compdef _cli_zsh_autocomplete $PROG
|
|
+compdef _cli_zsh_autocomplete tea
|