On 10/19/06, James Vega <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 20, 2006 at 01:29:04AM +0200, Axel Liljencrantz wrote:
[...]
> > Previously, function names could only consist of alphanumerics and
> > underscores, just like variables. This isn't very logical, though,
> > since regular commands can have any legal file name. This patch
> > changes the naming criteria. Functions may now have any legal file
> > name, and '/' is the only character which is forbidden in file names.

Hmm, it's good to remove differences in the ways functions versus
other commands are invoked.  That way the user does not have to worry
whether what he is invoking is a function.  But actually this is not
related to allowed characters in function names, because at invocation
time the command (function or other) is already defined.  I guess it
does allow for any  command to be wrapped inside a function by the
same name.

That brings up a question I had wanted to raise.  Functions are simiar
to scripts in files.  For example, instead of defining a "cp"
function, you can write an executable script in ~/bin/cp and put ~/bin
before /bin on the path.  I guess they each have relative advantages:
- functions can be defined interactively on the command line
- you know where a script is defined, in case you want to modify it
Have I missed any, and would it be better to not have functions at all?

> That depends on the filesystem.  This is the case for most (if not all)
> *nix filesystems, but I think OS X's filesystem has more restrictions.
> If I recall correctly, POSIX only specifies which characters *must* be
> allowed in filenames, and that's a fairly small list.  Anything beyond
> that is just icing on the cake.

If so, some functions will not work on some systems :-o  And there is
a discrepancy between variable names and function names.

-------------------------------------------------------------------------
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