* EQUALS =command expansion
@ 2006-11-24 4:57 Atom Smasher
2006-11-24 11:32 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: Atom Smasher @ 2006-11-24 4:57 UTC (permalink / raw)
To: zsh-users
this does what i'd expect:
$ ls -lh =lpr-portrait =lpr-landscape
-rwxr-xr-x 1 atom atom 89B Nov 21 04:13 /home/atom/bin/lpr-landscape
-rwxr-xr-x 1 atom atom 88B Nov 21 04:11 /home/atom/bin/lpr-portrait
but if i try to use TAB to expand "=lpr-*" it doesn't work. even without a
TAB expansion, i get this:
$ ls -lh =lpr-*
zsh: lpr-* not found
another example that i'd expect to "just work":
$ ls -l =*grep
zsh: *grep not found
i'd expect that to return:
/usr/bin/grep
/usr/bin/egrep
/usr/bin/fgrep
/usr/bin/bzgrep
/usr/bin/bzegrep
/usr/bin/bzfgrep
/usr/bin/zgrep
/usr/bin/zegrep
/usr/bin/zfgrep
/usr/bin/pgrep
/usr/local/bin/msggrep
/usr/local/bin/zipgrep
/usr/local/bin/pcregrep
(a lot of greps, and i haven't even installed ngrep on this box, yet.)
ZSH_VERSION=4.3.2
intuitively, the string "=lpr-*" should expand both with the TAB and when
executed on the command line. a quick look at the man pages doesn't seem
to indicate that this wouldn't work.
1) is this a zsh bug?
2) a documentation bug?
3) operator error?
thanks...
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"We will, in fact, be greeted as liberators."
-- Dick Cheney, 16 March 2003
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: EQUALS =command expansion
2006-11-24 4:57 EQUALS =command expansion Atom Smasher
@ 2006-11-24 11:32 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2006-11-24 11:32 UTC (permalink / raw)
To: zsh-users
On Thu, 23 Nov 2006 23:57:06 -0500 (EST)
Atom Smasher <atom@smasher.org> wrote:
> but if i try to use TAB to expand "=lpr-*" it doesn't work.
It should work if you are using the new completion system
and the GLOB_COMPLETE option is set. If it's not set,
you should still be able to complete =lpr- without the *
(* is not a standard completion syntax, it's usually used
for expansion on the command line).
> $ ls -lh =lpr-*
> zsh: lpr-* not found
That's not how it works. The filename expansion "=" is performed
first, searching for the path to a file name (not a pattern).
When that's finished filename generation handles the *.
That's why they're in different sections in the manual in that
order.
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-24 11:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-24 4:57 EQUALS =command expansion Atom Smasher
2006-11-24 11:32 ` Peter Stephenson
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).