Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing shell commands no longer works with fish as shell #4153

Open
peppy opened this issue Jan 7, 2025 · 2 comments
Open

Executing shell commands no longer works with fish as shell #4153

peppy opened this issue Jan 7, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@peppy
Copy link

peppy commented Jan 7, 2025

To Reproduce

Run a custom shell command with fish set as shell.

iTerm2.2025-01-07.at.09.18.34.mp4
❯ lazygit --version
commit=, build date=, build source=homebrew, version=HEAD-13829d8, os=darwin, arch=arm64, git version=2.47.1

❯ git --version
git version 2.47.1
@peppy peppy added the bug Something isn't working label Jan 7, 2025
@stefanhaller
Copy link
Collaborator

Damn, this whole "use an interactive shell for running custom commands" feature keeps causing problems. A similar error happens with nushell.

A workaround could be to define an alias or function for lazygit that exports SHELL=/bin/bash before calling lazygit.

As for a fix, maybe we should look at the $SHELL variable and only do the interactive thing if it ends with either /bash or /zsh (any others that are commonly used?), and fall back to calling bash (without -i) if not.

@peppy
Copy link
Author

peppy commented Jan 7, 2025

I'll do the shell export thing for now as a workaround, thanks for the suggestion.

I also noticed an occasional command failure when doing a lazygit amend operation that seemed to be similarly shell related – I'll post if it pops up again.

These kind of issues do make me consider switching back to zsh 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants