[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'official function declaration format' doesn't work if alias defined
From: |
Chet Ramey |
Subject: |
Re: 'official function declaration format' doesn't work if alias defined |
Date: |
Mon, 11 Jan 2016 10:11:06 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
On 1/9/16 2:21 PM, Eric Cook wrote:
> In mksh, ksh93, zsh and maybe others, you can use quotes to suppress alias
> expansions during definition just like you would a simple command;
> unfortunately bash deems it a invalid identifier.
This is how Posix specifies it, and how the `base implementations' (ksh-88
and the SVR4 sh) behaved. The function name has to be an identifier, and
at this point in the lexical analysis, the quotes have not been removed.
The ksh93/mksh/zsh quote removal behavior appears to be undocumented.
--
``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/
- Re: doesn't bash do variable subst. or quote removal on function statement, (continued)
- Re: doesn't bash do variable subst. or quote removal on function statement, Greg Wooledge, 2016/01/12
- Re: doesn't bash do variable subst. or quote removal on function statement, Linda Walsh, 2016/01/12
- Re: doesn't bash do variable subst. or quote removal on function statement, Chet Ramey, 2016/01/13
- Re: doesn't bash do variable subst. or quote removal on function statement, Linda Walsh, 2016/01/13
- Re: doesn't bash do variable subst. or quote removal on function statement, Chet Ramey, 2016/01/13
- Re: doesn't bash do variable subst. or quote removal on function statement, Chet Ramey, 2016/01/13
- Re: aliases v. functions; command extension? (-f & -F)?, Chet Ramey, 2016/01/11
- Re: aliases v. functions; command extension? (-f & -F)?, Reuti, 2016/01/11
- Re: aliases v. functions; command extension? (-f & -F)?, Chet Ramey, 2016/01/11
Re: 'official function declaration format' doesn't work if alias defined, Eric Cook, 2016/01/09
- Re: 'official function declaration format' doesn't work if alias defined,
Chet Ramey <=