451e51bd88
that prompts if upstream remote branch(es) should be deleted too. As with `git branch`, the function supports multiple branches as params, and also the `-r`/`--remotes` param. Update `gbx` and `gbX` to use this function. Also update `git-stash-clear-interactive` to have multiple tests instead of multiple nested `if`/`then`/`fi`. (Simpler syntax, IMHO)
10 lines
252 B
Bash
10 lines
252 B
Bash
# vim:et sts=2 sw=2 ft=zsh
|
|
setopt LOCAL_OPTIONS PIPE_FAIL
|
|
|
|
local -i stashed
|
|
stashed=$(command git stash list | wc -l) || return 1
|
|
if (( stashed )) && \
|
|
read -q "?Clear ${stashed} stashed state(s) [y/N]? "; then
|
|
print
|
|
command git stash clear
|
|
fi
|