fix(vi-mode): ignore `clip*` function errors in yank and put widgets

Fixes #9605
master
Marc Cornellà 6 years ago
parent 172b32c90d
commit efcbd9f348
  1. 4
      plugins/vi-mode/vi-mode.plugin.zsh

@ -100,13 +100,13 @@ function wrap_clipboard_widgets() {
eval " eval "
function ${wrapped_name}() { function ${wrapped_name}() {
zle .${widget} zle .${widget}
printf %s \"\${CUTBUFFER}\" | clipcopy printf %s \"\${CUTBUFFER}\" | clipcopy 2>/dev/null || true
} }
" "
else else
eval " eval "
function ${wrapped_name}() { function ${wrapped_name}() {
CUTBUFFER=\"\$(clippaste)\" CUTBUFFER=\"\$(clippaste 2>/dev/null || echo \$CUTBUFFER)\"
zle .${widget} zle .${widget}
} }
" "

Loading…
Cancel
Save