diff --git a/common/.config/zsh/config/widgets.zsh b/common/.config/zsh/config/widgets.zsh index a5da5dda..296fdb72 100644 --- a/common/.config/zsh/config/widgets.zsh +++ b/common/.config/zsh/config/widgets.zsh @@ -87,8 +87,8 @@ function lf-wrap() { zle -N lf-wrap function lazygit-wrap() { - [ ! -d "$(pwd)/.git" ] && [[ $(read -erk "?Not in a git repository. Create a new git repository? (y/n): ") =~ ^[Yy]$ ]] && git init - [ -d "$(pwd)/.git" ] && lazygit -p "$(pwd)" + [ ! -d "${PWD}/.git" ] && [[ $(read -erk "?Not in a git repository. Create a new git repository? (y/n): ") =~ ^[Yy]$ ]] && git init "$PWD" + [ -d "${PWD}/.git" ] && lazygit -p "$PWD" reset_prompt } zle -N lazygit-wrap