On Wed, Aug 16, 2006 at 08:25:50PM -0400, James Vega wrote:
> If I recall correctly, Fish doesn't use [] to perform alternation. Why
> have two different ways of doing the same thing? {7,8} works just as
> well and is more useful in general.
no it's not.
[78] should only expand to existing files.
{7,8} should always expand to every possible combination:
> ls
> touch foo{1,2,3}
> ls
foo1 foo2 foo3
> ls foo[12345]
ls: foo[12345]: No such file or directory
> ls foo{1,2,3,4,5}
ls: foo4: No such file or directory
ls: foo5: No such file or directory
foo1 foo2 foo3
> bash
$ ls foo[12345]
foo1 foo2 foo3
$ ls foo{1,2,3,4,5}
ls: foo4: No such file or directory
ls: foo5: No such file or directory
foo1 foo2 foo3
$ ls foo[45]
ls: foo[45]: No such file or directory
$ shopt -s nullglob
$ ls foo[45]
foo1 foo2 foo3
$ shopt -s failglob
$ ls foo[45]
bash: no match: foo[45]
since it is potentially harmful to give nonexisting filenames to
programs (touch is one example, if you do not want to create new files)
being able to expand to only existing files is rather important.
note that i am not asking to copy bash, only for some way to selectively
expand to existing matches. if there are no matches then the command
should abort (like bashs nondefault failglob setting)
greetings, martin.
--
cooperative communication with sTeam - caudium, pike, roxen and unix
offering: programming, training and administration - anywhere in the world
--
pike programmer travelling and working in europe open-steam.org
unix system- bahai.or.at iaeste.(tuwien.ac|or).at
administrator (caudium|gotpike).org is.schon.org
Martin Bähr http://www.iaeste.or.at/~mbaehr/
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users