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: Alex fxmbsw7 Ratchev
Subject: Re: why does this define bla() instead of respect the newline as command separator
Date: Fri, 19 Mar 2021 14:36:50 +0100

yes, thank you

On Fri, Mar 19, 2021, 14:11 Chet Ramey <chet.ramey@case.edu> wrote:

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