Hi,
Currently, the string '**' is a recursive directory expansion in fish.
At the time when this was implemented, it was discussed on the mailing
list wether '**' should axpand to any file or only to directories.
Since other programs like zsh and ant use '**' to recursively expand
to any subdirectories, this was the behaviour that was chosen. I don't
like this behaviour and I think it should be changed.
There are two reasons:
Firstly, because it doesn't let me select files recursively the way I
want. At first, I thought that '**/*' could be used to do this, but
that doesn't work in all cases. Consider this list of files:
.fish
.fish.d/
.fish.d/ggg
.config/
Now, if I want to match all files starting with 'fish', I can't use
the wildcard '.fish**/*', because that won't match the file '.fish'.
I'll end up having to write '.fish{,**/}*', which is unreadable as
well as a lot of typing.
If '**' would match files as well as directories, this problem would
go away and I could just write '.fish**'.
Secondly, the revised behaviour is conceptually easier and more
logical, at least to me. If you look at globbing as the operation of
selecting a set of filenames from the list of all filenames on the
system, then the following definitions can be used:
?: Matches any character except '/'
*: Matches any substring not including the character '/'
**: Matches any substring
To me, this seems much more intuitive.
Unless someone has a very strong reason for sticking with the current
behaviour, it will change.
--
Axel
-------------------------------------------------------------------------
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