[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [OT] Re: how to start in "overwrite-mode"
From: |
Chet Ramey |
Subject: |
Re: [OT] Re: how to start in "overwrite-mode" |
Date: |
Wed, 28 Oct 2009 09:46:49 -0400 |
User-agent: |
Thunderbird 2.0.0.23 (Macintosh/20090812) |
Stephane CHAZELAS wrote:
> 2009-10-28 09:00:59 -0400, Chet Ramey:
>>> zle-line-init() zle overwrite-mode
>>> zle -N zle-line-init
>>>
>>> To get back on topic, bash is the only Bourne-like shell that I
>>> know that doesn't allow that function definition syntax above,
>>> I've always wondered why.
>> The Posix grammar has never allowed it (a `function_body' must be a
>> compound command, and that's what bash implements), and there has
>> never been sufficient demand to add it as an extension.
> [...]
>
> It's never allowed it to POSIX _scripts_, but it won't make a
> shell non-conformant to support it (and ksh, pdksh, ash, zsh
> even posh all do support it), just like most POSIX conformant
> shells support arrays for instance even though that's not a
> POSIX feature.
That's why I said it would be added as an extension.
> bash not supporting it helps for writing POSIX compliant scripts
> (as it will return an error if one tries to use that
> non-standard feature), but as bash is the only POSIX shell that
> doesn't support it, it feels a bit silly.
"Silly" it may be, but there's not really the demand for it.
> I wonder what's the rationale for POSIX not supporting it (is it
> because of bash?).
That would be the tail wagging the dog, wouldn't it? It's never been
in the grammar.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- [OT] Re: how to start in "overwrite-mode", Stephane CHAZELAS, 2009/10/28
- Re: [OT] Re: how to start in "overwrite-mode", Chet Ramey, 2009/10/28
- Re: [OT] Re: how to start in "overwrite-mode", Stephane CHAZELAS, 2009/10/28
- Re: [OT] Re: how to start in "overwrite-mode",
Chet Ramey <=
- Re: [OT] Re: how to start in "overwrite-mode", Stephane CHAZELAS, 2009/10/28
- Re: [OT] Re: how to start in "overwrite-mode", Greg Wooledge, 2009/10/28
- Re: [OT] Re: how to start in "overwrite-mode", Chris F.A. Johnson, 2009/10/28
- Re: [OT] Re: how to start in "overwrite-mode", Stephane CHAZELAS, 2009/10/28
- Re: [OT] Re: how to start in "overwrite-mode", Chet Ramey, 2009/10/28
- Re: [OT] Re: how to start in "overwrite-mode", Marc Herbert, 2009/10/29