From 59aba6c965455891a22e8ea22f561854e43903bd Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 15 Feb 2018 16:27:45 +1300 Subject: [PATCH 1/1] also confirm vit pastes --- .zsh/zshrc/20-tempfile+dir_functions | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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}") -- 2.39.5