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

Bug in url-quote-magic?



Hi,
while using url-quote-magic i discoverd a strange behaviour.
If i enter an url, followed by space, and after that a semicolon, the
semicolon is escaped. This is really ugly if i use something like
,----
| while mplayer $url ; do 
|    sleep 10 ; 
| done 
`----

because this gets to, 

,----
| while mplayer $url \; do ..
`----

I attached the diff, hope it helps someone :)

Uli
--- /usr/share/zsh/4.3.2/functions/Zle/url-quote-magic  2006-05-20 19:55:36.000000000 +0200
+++ url-quote-magic     2006-06-06 01:36:56.332676750 +0200
@@ -108,7 +108,7 @@
 function url-quote-magic {
     setopt localoptions noksharrays extendedglob
     local qkey="${(q)KEYS}"
-    if [[ "$KEYS" != "$qkey" ]]
+    if [[ "$KEYS" != "$qkey" && "$LBUFFER[-1]" != " " ]] 
     then
        local lbuf="$LBUFFER$qkey"
        if [[ "${(Q)LBUFFER}$KEYS" == "${(Q)lbuf}" ]]



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