Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

delete-whole-word-match fails on words starting with -, patch



-- isn't documented in the manual for the zle builtin, but seems to do
the trick anyway.

diff --git a/Functions/Zle/delete-whole-word-match
b/Functions/Zle/delete-whole-word-match
index 978b95e..51314cf 100644
--- a/Functions/Zle/delete-whole-word-match
+++ b/Functions/Zle/delete-whole-word-match
@@ -49,7 +49,7 @@ if [[ $WIDGET = *kill* ]]; then
   if [[ $LASTWIDGET = *kill* ]]; then
     CUTBUFFER="$CUTBUFFER$word"
   else
-    zle copy-region-as-kill "$word"
+    zle copy-region-as-kill -- "$word"
   fi
 fi
 BUFFER="${BUFFER[1,pos1]}${BUFFER[pos2,-1]}"

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author