Skip to content

Commit f28b6f4

Browse files
committed
Support fish when running shell command
This should allow using custom shell functions in lazygit's : prompt.
1 parent 08751d6 commit f28b6f4

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)