help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why does this define bla() instead of respect the newline as command


From: Chet Ramey
Subject: Re: why does this define bla() instead of respect the newline as command separator
Date: Fri, 19 Mar 2021 09:11:22 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 3/19/21 4:12 AM, Alex fxmbsw7 Ratchev wrote:
eval $'alias n=bla\nn() { type $FUNCNAME ; }\nn'
bla is a function
bla ()
{
     type $FUNCNAME
}

it was supposed to be n() ..

`n' is the first word in a position where a simple command can be parsed,
so it's subject to alias expansion.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]