Skip to content

Commit ddc14ef

Browse files
authored
Support fish when running shell command (#4350)
- **PR Description** This should allow using custom shell functions in lazygit's : prompt. Fixes #4342.
2 parents 08751d6 + f28b6f4 commit ddc14ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/commands/oscommands/os_default_platform.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ func GetPlatform() *Platform {
1616
interactiveShellArg := "-i"
1717
interactiveShellExit := "; exit $?"
1818

19-
if !(strings.HasSuffix(shell, "bash") || strings.HasSuffix(shell, "zsh")) {
19+
if strings.HasSuffix(shell, "fish") {
20+
interactiveShellExit = "; exit $status"
21+
} else if !(strings.HasSuffix(shell, "bash") || strings.HasSuffix(shell, "zsh")) {
2022
interactiveShell = "bash"
2123
interactiveShellArg = ""
2224
interactiveShellExit = ""

0 commit comments

Comments
 (0)