Support fish when running shell command

This should allow using custom shell functions in lazygit's : prompt.
This commit is contained in:
Stefan Haller 2025-03-02 15:24:45 +01:00
parent 08751d6b60
commit f28b6f439d

View file

@ -16,7 +16,9 @@ func GetPlatform() *Platform {
interactiveShellArg := "-i" interactiveShellArg := "-i"
interactiveShellExit := "; exit $?" interactiveShellExit := "; exit $?"
if !(strings.HasSuffix(shell, "bash") || strings.HasSuffix(shell, "zsh")) { if strings.HasSuffix(shell, "fish") {
interactiveShellExit = "; exit $status"
} else if !(strings.HasSuffix(shell, "bash") || strings.HasSuffix(shell, "zsh")) {
interactiveShell = "bash" interactiveShell = "bash"
interactiveShellArg = "" interactiveShellArg = ""
interactiveShellExit = "" interactiveShellExit = ""