From efcbd9f3480a28ec69c607c46adcbfd8d230ac9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sat, 16 Jan 2021 22:55:17 +0100 Subject: [PATCH] fix(vi-mode): ignore `clip*` function errors in yank and put widgets Fixes #9605 --- plugins/vi-mode/vi-mode.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index 0b11a6a7f..7f14961ad 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -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} } "