Skip to content

Commit 2ac01f4

Browse files
committed
Fix Shell guess for completion when SHELL is empty
1 parent bcfce4f commit 2ac01f4

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)