Skip to content

Commit

Permalink
fix(vi-mode): ignore clip* function errors in yank and put widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella committed Jan 16, 2021
1 parent 172b32c commit efcbd9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/vi-mode/vi-mode.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ function wrap_clipboard_widgets() {
eval "
function ${wrapped_name}() {
zle .${widget}
printf %s \"\${CUTBUFFER}\" | clipcopy
printf %s \"\${CUTBUFFER}\" | clipcopy 2>/dev/null || true
}
"
else
eval "
function ${wrapped_name}() {
CUTBUFFER=\"\$(clippaste)\"
CUTBUFFER=\"\$(clippaste 2>/dev/null || echo \$CUTBUFFER)\"
zle .${widget}
}
"
Expand Down

0 comments on commit efcbd9f

Please sign in to comment.