-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Topic
When opening lazygit in a subdirectory of a git repo, it automatically cd's up to the repo root to show a clearer file tree view from the root of the repo. However, this automatic cd does not play well with shell integration (using LAZYGIT_NEW_DIR_FILE) which tells that the current directory has been changed and thus cd's the current shell session to root of the repository.
Your thoughts
This could be worked around by using a more elaborate wrapper than the one currently suggested in the README, but I think, it would be more valuable to not have these kind of automatic cds behave the same way as user-input cds with regards to LAZYGIT_NEW_DIR_FILE.
Of course another alternative is for the user to use the quitWithoutChangingDirectory bind (Q by default) each time they know they haven't changed directory, but I think this should not be up to the user to handle.
Apart from this quirk, I do believe this is a nice feature, I was just very surprised when I found myself magically cd'd to the root of my repository soon after starting to use the wrapper suggested in the readme.