diff options
| -rw-r--r-- | makeAutocompleteFiles.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/makeAutocompleteFiles.go b/makeAutocompleteFiles.go index 2010c42..2a5f972 100644 --- a/makeAutocompleteFiles.go +++ b/makeAutocompleteFiles.go @@ -7,9 +7,23 @@ import ( func MakeAutocompleteFiles(argname string) { if _, ok := os.LookupEnv("BASH_VERSION"); ok { MakeBashCompleteFiles(argname) + return } if _, ok := os.LookupEnv("ZSH_VERSION"); ok { MakeZshCompleteFiles(argname) + return + } + + if s, ok := os.LookupEnv("SHELL"); ok { + switch s { + case "/bin/bash": + MakeBashCompleteFiles(argname) + return + case "/bin/zsh": + MakeZshCompleteFiles(argname) + return + } + MakeBashCompleteFiles(argname) } } |
