fix(lg): better "cd-on-quit"
This commit is contained in:
parent
fd5bfdf613
commit
eb2d096fa2
2
.zshrc
2
.zshrc
@ -209,7 +209,7 @@ alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
|
|||||||
|
|
||||||
lg()
|
lg()
|
||||||
{
|
{
|
||||||
export LAZYGIT_NEW_DIR_FILE=~/.lazygit/newdir
|
export LAZYGIT_NEW_DIR_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/lazygit/cd-on-quit_$$"
|
||||||
lazygit "$@"
|
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)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user