On 2/18/23 2:05 AM, Chet Ramey wrote:
If the shell reads an unquoted word in the right position, it checks
the word to see if it matches an alias name. If it matches, the shell
replaces the word [in the input] with the alias value, and reads that
value as if it had been read [from the input] instead of the word.
This isn't what bash does. See:

    $ alias foo='cat <<EOF
    bar
    EOF
    '
    $ foo
    $ date
    $ uname
    $ ^C
    $ date
    Sat Feb 18 08:41:32 AM +03 2023
    $

Other shells I tested print `bar' and return to prompt. I remember reporting a bug like this before but not sure if it was the same.


Reply via email to