1
0
Fork 0
mirror of synced 2024-11-04 15:58:57 -05:00
zimfw/modules/git/functions/git-stash-clear-interactive

11 lines
252 B
Text
Raw Normal View History

# vim:et sts=2 sw=2 ft=zsh
setopt LOCAL_OPTIONS PIPE_FAIL
2015-12-15 00:12:17 -05:00
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
2015-12-15 00:12:17 -05:00
fi