1
0
Fork 0
mirror of synced 2024-12-25 07:23:21 -05:00
zimfw/modules/git/functions/git-stash-clear-interactive

11 lines
253 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 )); then
if read -q "?Clear ${stashed} stashed state(s) [y/N]? "; then
command git stash clear
2015-12-15 00:12:17 -05:00
fi
fi