unalias getpw 2>/dev/null getpw() { if ! pass -c "$@"; then if old-getpw "$@"; then echo >&2 "Please migrate the password for $@" genpw "$@" echo >&2 "Old password is now in X paste buffer, new one in clipboard" fi fi } autoload -zU compdef compdef _pass getpw