On 9/4/06, Philip Ganchev <[EMAIL PROTECTED]> wrote:
> On 9/3/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote:
> [...]
> > Separating function definition and listing into
> > two builtins is very unfortunate, it is a side effect from having the
> > 'function' builtin create a new block scope. 'set' and 'functions'
> > share a lot of behaviour, including many commandline switches.
> [...]
>
> Right, I know.  So you could make `set` and `bind` also print help
> like `function` does, and make `set -a` and `bind -a` print list
> current definitions, like `functions` does.  Wouldn't that make all
> three even more alike in syntax?

Since the 'functions' builtin already prints all function definitions
when writing 'functions' alone, you would need to change that one as
well.

To me, it feels natural that the default action for these functions is
to give you a bit of information on what's happening, and that you
should get help if you 'asked for it' either directly using a help
switch or indirectly by making a syntax error. 'function' prints the
usage message because you didn't specify a function name or close the
block, so you made two syntax errors. But what the default action of a
command should be is a matter of opinion. Different commands do
different things. I'm open to discussion on what is the best action,
but to me it seems that the current behaviour of e.g. 'set' is sane,
so you will have to change my opinion.

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

Reply via email to