Skip to content

Commit 150623e

Browse files
committed
fix: use program name when detecting shell via $SHELL
1 parent 5a56b57 commit 150623e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

completion/all.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func ShellOptions(choice *string) *serpent.Enum {
5959
func DetectUserShell(programName string) (Shell, error) {
6060
// Attempt to get the SHELL environment variable first
6161
if shell := os.Getenv("SHELL"); shell != "" {
62-
return ShellByName(filepath.Base(shell), "")
62+
return ShellByName(filepath.Base(shell), programName)
6363
}
6464

6565
// Fallback: Look up the current user and parse /etc/passwd

0 commit comments

Comments
 (0)