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

Allow customize Shell & ShellArg in config.yml #3749

Open
yam-liu opened this issue Jul 15, 2024 · 2 comments
Open

Allow customize Shell & ShellArg in config.yml #3749

yam-liu opened this issue Jul 15, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@yam-liu
Copy link
Contributor

yam-liu commented Jul 15, 2024

Is your feature request related to a problem? Please describe.
I have tons of aliases but cannot use them directly in Lazygit because bash is the default shell.
I use zsh.
I found some solutions like zsh -ic, but I need to prefix it every time, it is so inconvenient.
CleanShot 2024-07-15 at 13 35 25@2x

Describe the solution you'd like
Support customization in config.yml like:

os:
  shell: "",
  shellArg: "",

Describe alternatives you've considered
Detect user shell and support alias. I found a closed PR, but didn't dig into it, maybe there are some bugs in that implementation?

Additional context
None

@yam-liu yam-liu added the enhancement New feature or request label Jul 15, 2024
@stefanhaller
Copy link
Collaborator

This could be considered a duplicate of #770 and #1642.

There are two possible approaches to solving this:

  • Always use the user's shell (as specified in the $SHELL env variable), and unconditionally add -i, under the assumption that all modern shells support it. This has been tried in Detect the user's shell for running custom commands #2096. If I understand correctly, there were problems with this approach; if we can get this to work, it would be my preferred solution because it doesn't need a any user config.
  • Make the shell (and shell args) configurable like you suggest. This has been tried in Add option to specify other shell(Arg) #3299, which, as far as I can see, implements exactly what you are proposing.

@yam-liu
Copy link
Contributor Author

yam-liu commented Jul 15, 2024

@stefanhaller Thanks for the quick and detailed reply. I am glad to see there are already solutions for this issue.
I noticed the first SHELL solution (S1) and it has problems. So I prefer solution 2 (S2).

So before we figure that issue (in S1) out and fix it, can we push the shell(Arg) solution (S2) a step forward?
It has been for a long while (roughly 4 months), may I know what the current blocking point is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants