Make zshrc need an enter to interact with chezmoi functions
This commit is contained in:
parent
abe36b2490
commit
abb3c811f9
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
# Required init for cli programs
|
# Required init for cli programs
|
||||||
# Do not install completions unless no working, check /usr/share/bash-completion
|
# Do not install completions unless no working, check /usr/share/bash-completion
|
||||||
eval "$(zoxide init zsh)"
|
|
||||||
autoload -Uz promptinit
|
autoload -Uz promptinit
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
promptinit
|
promptinit
|
||||||
@ -44,12 +43,14 @@ function .add {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chezmoi add $1
|
chezmoi add "$1"
|
||||||
chezmoi git add .
|
chezmoi git add .
|
||||||
chezmoi git status
|
chezmoi git status
|
||||||
if $(read -q "?Commit changes? [y/N]"); then
|
read -p "Commit changes? [y/N] " -r answer
|
||||||
chezmoi git commit -- -am $2
|
if [[ $answer =~ ^[Yy]$ ]]; then
|
||||||
if $(read -q "?Push changes? [y/N]"); then
|
chezmoi git commit -- -am "$2"
|
||||||
|
read -p "Push changes? [y/N] " -r answer
|
||||||
|
if [[ $answer =~ ^[Yy]$ ]]; then
|
||||||
chezmoi git push
|
chezmoi git push
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -63,9 +64,11 @@ function .re-add {
|
|||||||
chezmoi re-add
|
chezmoi re-add
|
||||||
chezmoi git status
|
chezmoi git status
|
||||||
chezmoi git diff
|
chezmoi git diff
|
||||||
if $(read -q "?Commit changes? [y/N]"); then
|
read -p "Commit changes? [y/N] " -r answer
|
||||||
chezmoi git commit -- -am $1
|
if [[ $answer =~ ^[Yy]$ ]]; theno
|
||||||
if $(read -q "?Push changes? [y/N]"); then
|
chezmoi git commit -- -am "$1"
|
||||||
|
read -p "Push changes? [y/N] " -r answer
|
||||||
|
if [[ $answer =~ ^[Yy]$ ]]; then
|
||||||
chezmoi git push
|
chezmoi git push
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -94,3 +97,6 @@ RPROMPT="%?:%h | %*"
|
|||||||
|
|
||||||
# Starship after defining custom prompt, easy to remove
|
# Starship after defining custom prompt, easy to remove
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
|
# Zoxide
|
||||||
|
eval "$(zoxide init zsh)"
|
Loading…
x
Reference in New Issue
Block a user