hi,

this one left me puzzeled for quite a while:

i was doing something along the lines of:
> ls foo/*/(ls bar)

and i kept getting:
fish: Warning: No match for wildcard "foo/*/(ls bar)". The command will not be
executed.
ls foo/*/(ls bar)
   ^
which made no sense because on manual inspection the files were there.
then i tried:

> for i in (ls bar); ls foo/*/$i; end
fish: Warning: No match for wildcard #foo/*/$i#. The command will not be
executed.
for i in (ls bar); ls foo/*/$i; end
                        ^
> ls bar
bar*  baz*  gazong*
> ls foo/*/*
foo/ba/bar*  foo/ba/baz*  foo/ba/gazong*  foo/fo/a*  foo/fo/b* foo/fo/c*

files are there, so why where they not found?
this took me some time to figure out.

in the end i discovered:
> ls bar/ | less
bar*
baz*
gazong*

why are there *s behind the files in the pipe?
of course fish can't find files that end with "*"

> functions ls
function ls --description List\ contents\ of\ directory
        command ls --color=auto --indicator-style=classify $argv
end

that's the bug:
removing --indicator-style=classify solved the problem.


but i love classify, i don't want to remove it.

this leads to the question:
how can a function detect if it is being used in a pipe?


interrestingly, after creating a fixed copy of the function in my users
directory i discovered this:
> ls bar
bar*  baz*  gazong*
> ls bar
bar  baz  gazong
> functions ls
function ls --description List\ contents\ of\ directory
        command ls --color=auto $argv
end

> functions ls
function ls --description List\ contents\ of\ directory
        command ls --color=auto --indicator-style=classify $argv
end

it seems that fish is getting randomly confused about which function to use...

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

Reply via email to