]> git.madduck.net Git - etc/zsh.git/blobdiff - .zsh/zshrc/20-tempfile+dir_functions

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

also confirm vit pastes
[etc/zsh.git] / .zsh / zshrc / 20-tempfile+dir_functions
index 52ceb198d754ccacac96d11042cea62c3a23bb4b..b887ba64030017f38a783eee09acdc553b4be16a 100644 (file)
@@ -58,13 +58,9 @@ pastebin() {
 
 _pastebinit() {
   emulate -L zsh
-  if [[ -f "$REPLY" ]]; then
-    read -q "yesno?\rShould I paste the file $REPLY? [yN] "
-    zle reset-prompt
-  else
-    vit paste
-    yesno=y
-  fi
+  [[ -f "$REPLY" ]] || vit paste
+  read -q "yesno?\rShould I paste the file $REPLY? [yN] "
+  zle reset-prompt
   if [[ ${yesno:-n} == y ]]; then
     zle -cR "pasting $REPLY …"
     REPLY=$(pastebin "${REPLY}")