1
0
Fork 0

zsh: fix lazygit widget

This commit is contained in:
Luca Bilke 2024-11-13 15:26:56 +01:00
parent 1d0b78f68d
commit 30309df553
Signed by: luca
GPG key ID: F6E11C9BAA7C82F5

View file

@ -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