zsh-workers
 help / color / mirror / code / Atom feed
* Expanding "foo\ *"
@ 2001-03-11  3:48 Wayne Davison
  2001-03-11 18:00 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Wayne Davison @ 2001-03-11  3:48 UTC (permalink / raw)
  To: Zsh Workers

Here's a bug with the new completion system (I'm using 4.0.1-pre2,
but the bug predates this version):

% zsh -f
% autoload -U compinit
% compinit
% zstyle ':completion:*' completer _expand _complete
% touch 'foo bar' 'foo baz'
% bindkey '\t' complete-word
% ls -l foo\ *<TAB>
   (Error beep)
% ls -l foo\ ba*<TAB>
   (Error beep)
% ls -l foo*<TAB>
   (Expands)

So, it seems that the escaped space interferes with the expansion.

..wayne..


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Expanding "foo\ *"
  2001-03-11  3:48 Expanding "foo\ *" Wayne Davison
@ 2001-03-11 18:00 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2001-03-11 18:00 UTC (permalink / raw)
  To: Zsh Workers

On Mar 10,  7:48pm, Wayne Davison wrote:
} Subject: Expanding "foo\ *"
}
} Here's a bug with the new completion system (I'm using 4.0.1-pre2,
} but the bug predates this version):
} 
} % ls -l foo\ *<TAB>
}    (Error beep)

Try this.  There should be a space and a tab at the end of the first `+'
line in the replacement part of the hunk, in case the mail system eats it.

Index: Completion/Core/_expand
===================================================================
diff -c -r1.48 _expand
--- Completion/Core/_expand	2001/02/08 03:49:32	1.48
+++ Completion/Core/_expand	2001/03/11 17:57:34
@@ -68,7 +68,8 @@
 # Now try globbing.
 
 [[ "$force" = *g* ]] || zstyle -T ":completion:${curcontext}:" glob &&
-    eval 'exp=( ${~exp} ); exp=( ${(q)exp} )' 2>/dev/null
+    eval 'exp=( ${~exp//(#b)\\[ 	
+]/$match[1]} ); exp=( ${(q)exp} )' 2>/dev/null
 
 ### Don't remember why we once used this instead of the (q) above.
 #    eval 'exp=( ${~exp} ); exp=( ${exp//(#b)([][()|*?^#~<>\\=])/\\${match[1]}} )' 2>/dev/null

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-03-11 18:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-11  3:48 Expanding "foo\ *" Wayne Davison
2001-03-11 18:00 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).