Skip to content

Commit e5798f5

Browse files
fix: use program name when detecting shell via $SHELL (#27)
1 parent 5f3d052 commit e5798f5

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)