From: martin f. krafft Date: Thu, 15 Feb 2018 03:27:45 +0000 (+1300) Subject: also confirm vit pastes X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/59aba6c965455891a22e8ea22f561854e43903bd?ds=sidebyside also confirm vit pastes --- diff --git a/.zsh/zshrc/20-tempfile+dir_functions b/.zsh/zshrc/20-tempfile+dir_functions index 52ceb19..b887ba6 100644 --- a/.zsh/zshrc/20-tempfile+dir_functions +++ b/.zsh/zshrc/20-tempfile+dir_functions @@ -58,13 +58,9 @@ pastebin() { _pastebinit() { emulate -L zsh - if [[ -f "$REPLY" ]]; then - read -q "yesno? Should I paste the file $REPLY? [yN] " - zle reset-prompt - else - vit paste - yesno=y - fi + [[ -f "$REPLY" ]] || vit paste + read -q "yesno? Should I paste the file $REPLY? [yN] " + zle reset-prompt if [[ ${yesno:-n} == y ]]; then zle -cR "pasting $REPLY …" REPLY=$(pastebin "${REPLY}")