1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-02 15:11:03 +01:00

lazygit: fix bash integration (#8153)

- if the shellWrapperName is equal to the binary, then calling the
binary without command will cause an infinite recursion
This commit is contained in:
Marijan Petričević 2025-11-12 16:31:32 +01:00 committed by GitHub
parent 37a3d97f28
commit dfca39f8af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -94,7 +94,7 @@ in
bashIntegration = '' bashIntegration = ''
${cfg.shellWrapperName}() { ${cfg.shellWrapperName}() {
export LAZYGIT_NEW_DIR_FILE=${lazygitNewDirFilePath} export LAZYGIT_NEW_DIR_FILE=${lazygitNewDirFilePath}
lazygit "$@" command lazygit "$@"
if [ -f $LAZYGIT_NEW_DIR_FILE ]; then if [ -f $LAZYGIT_NEW_DIR_FILE ]; then
cd "$(cat $LAZYGIT_NEW_DIR_FILE)" cd "$(cat $LAZYGIT_NEW_DIR_FILE)"
rm -f $LAZYGIT_NEW_DIR_FILE > /dev/null rm -f $LAZYGIT_NEW_DIR_FILE > /dev/null