1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-23 12:18:51 +02:00

10 Commits

Author SHA1 Message Date
Stefan Haller
dbd407c01d Use interactive shell for running shell commands only if shell is bash or zsh
We use an interactive shell so that users can use their custom shell aliases in
lazygit's shell prompt, which is convenient; however, this only really works for
shells like bash or zsh. We know it doesn't work for fish or nushell (because
these use different names for the $? variable); so use an interactive shell only
if the user's shell is either bash or zsh.
2025-01-09 09:29:31 +01:00
Stefan Haller
5fac40c129 Fix hang when returning from shell command
In 5a3049485c we changed the execution of shell commands to use an interactive
shell (-i), because this allows users to use aliases or shell functions, which
is a nice convenience.

Since then, however, many users have reported problems with lazygit not coming
back to the foreground after executing a shell command. Some users report that
appending "; exit" to the end of the command line solves this. I don't really
understand what the cause of this problem was, or why appending "; exit" solves
it, but if it helps, let's do it.
2024-12-28 14:53:57 +01:00
Stefan Haller
5a3049485c Use an interactive shell for running custom commands
Also, use the user's shell (from the SHELL env variable) instead of bash. Both
of these together allow users to use their shell aliases or shell functions in
the interactive command prompt.
2024-08-17 10:32:18 +02:00
Jesse Duffield
95b2e9540a update tests 2022-01-04 09:07:15 +11:00
Ryooooooga
1e50764b4d Fix tests 2021-10-17 11:00:20 +11:00
black_desk
66d0fd2133 Format code to pass lint 2021-09-16 21:38:43 +08:00
Ryooooooga
c3d7de1c18 Change not to use cat command 2021-08-25 21:32:48 +10:00
Jesse Duffield
8901d11674 fix merge conflict cat issue on windows 2021-04-02 13:15:07 +11:00
Ryooooooga
50e4e9d58d fix command escaping 2021-03-13 10:49:40 +11:00
Jesse Duffield
1759ddf247 move OS commands into their own package 2020-09-29 20:48:49 +10:00