fix(lg): better "cd-on-quit"

This commit is contained in:
Michel 2023-10-31 19:03:54 +01:00
parent fd5bfdf613
commit eb2d096fa2
1 changed files with 1 additions and 1 deletions

2
.zshrc
View File

@ -209,7 +209,7 @@ alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
lg()
{
export LAZYGIT_NEW_DIR_FILE=~/.lazygit/newdir
export LAZYGIT_NEW_DIR_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/lazygit/cd-on-quit_$$"
lazygit "$@"
if [ -f $LAZYGIT_NEW_DIR_FILE ]; then
cd "$(cat $LAZYGIT_NEW_DIR_FILE)"