diff --git a/completion_installer.go b/completion_installer.go index f94de50..0795cb2 100644 --- a/completion_installer.go +++ b/completion_installer.go @@ -137,5 +137,9 @@ Add this to the end of your shell configuration file (e.g. "{{ call .RcFil } func GuessShell() string { - return path.Base(os.Getenv("SHELL")) + if shell := os.Getenv("SHELL"); shell != "" { + return path.Base(shell) + } + + return "" }