zsh: fix lazygit widget
This commit is contained in:
parent
1d0b78f68d
commit
30309df553
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue