zsh-users
 help / color / mirror / code / Atom feed
* KSH style globbing
@ 1999-11-06 19:54 Stefan Troeger
  1999-11-07  0:47 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Troeger @ 1999-11-06 19:54 UTC (permalink / raw)
  To: zsh-users

Hi,

I have a question regarding ksh-like globbing. I have a
directory with the files `foo', `bar' and `com' and want to
display every file in it that does not contain an a. In ksh or
bash I'd use

ls !(*a*)

for it. If I do a

setopt KSH_GLOB
ls !(*a*)

in zsh it says

zsh: number expected

What am I doing wrong?

Ciao,
	Stefan


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

* Re: KSH style globbing
  1999-11-06 19:54 KSH style globbing Stefan Troeger
@ 1999-11-07  0:47 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1999-11-07  0:47 UTC (permalink / raw)
  To: Stefan Troeger, zsh-users

On Nov 6,  8:54pm, Stefan Troeger wrote:
} Subject: KSH style globbing
}
} setopt KSH_GLOB
} ls !(*a*)
} 
} zsh: number expected
} 
} What am I doing wrong?

You need

	setopt KSH_GLOB NO_BARE_GLOB_QUAL

Otherwise, the trailing parens are interpreted as a glob qualifier before
they have a chance to be considered as a ksh pattern.  This ought to be
documented better.

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


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

end of thread, other threads:[~1999-11-07  0:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-06 19:54 KSH style globbing Stefan Troeger
1999-11-07  0:47 ` 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).