# 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 )); then
if read -q "?Clear ${stashed} stashed state(s) [y/N]? "; then
command git stash clear
fi