Skip to content

Commit 913bd94

Browse files
authored
Merge pull request #23 from tucksaun/fix/completion-shell-guess
Fix Shell guess for completion when `SHELL` is empty
2 parents bcfce4f + 2ac01f4 commit 913bd94

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

completion_installer.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,9 @@ Add this to the end of your shell configuration file (e.g. <info>"{{ call .RcFil
137137
}
138138

139139
func GuessShell() string {
140-
return path.Base(os.Getenv("SHELL"))
140+
if shell := os.Getenv("SHELL"); shell != "" {
141+
return path.Base(shell)
142+
}
143+
144+
return ""
141145
}

0 commit comments

Comments
 (0)