Re: 'official function declaration format' doesn't work if alias defined

2016-01-11 Thread Chet Ramey
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 implementati

Re: 'official function declaration format' doesn't work if alias defined

2016-01-09 Thread Eric Cook
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.

Re: 'official function declaration format' doesn't work if alias defined

2016-01-07 Thread Reuti
Hi, Am 07.01.2016 um 00:49 schrieb Linda Walsh: > I had an alias referring to printf that I wanted to replace > with a function. > > instead of using the function declarator > 'function' (or my alias 'sub'), I remembered that the official > way was to use: > > P () { > ... > } > > But then r

Re: 'official function declaration format' doesn't work if alias defined

2016-01-07 Thread Greg Wooledge
On Wed, Jan 06, 2016 at 03:49:35PM -0800, Linda Walsh wrote: > I had an alias referring to printf that I wanted to replace > with a function. > > But then ran into problems with the alias taking precedence over the > function. Yup. That's one of the many evils of aliases. They need to be remove

'official function declaration format' doesn't work if alias defined

2016-01-06 Thread Linda Walsh
I had an alias referring to printf that I wanted to replace with a function. instead of using the function declarator 'function' (or my alias 'sub'), I remembered that the official way was to use: P () { ... } But then ran into problems with the alias taking precedence over the function.