[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Having an alias and a function with the same name leads to some sort
From: |
Chet Ramey |
Subject: |
Re: Having an alias and a function with the same name leads to some sort of recursion |
Date: |
Mon, 20 Feb 2023 10:11:05 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 |
On 2/18/23 12:50 AM, Oğuz İsmail Uysal wrote:
$ 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.
Yes, in this instance, bash tries to read the text of the here-document
from the input instead of the alias value. It's been on the list to fix
for a while. It's not hard, just hasn't gotten there yet in priority.
--
``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/
- Re: Having an alias and a function with the same name leads to some sort of recursion, (continued)
- Re: Having an alias and a function with the same name leads to some sort of recursion, Chet Ramey, 2023/02/07
- Re: Having an alias and a function with the same name leads to some sort of recursion, Robert Elz, 2023/02/07
- Re: Having an alias and a function with the same name leads to some sort of recursion, Dale R. Worley, 2023/02/14
- Re: Having an alias and a function with the same name leads to some sort of recursion, alex xmb ratchev, 2023/02/14
- Re: Having an alias and a function with the same name leads to some sort of recursion, Chet Ramey, 2023/02/16
- Re: Having an alias and a function with the same name leads to some sort of recursion, alex xmb ratchev, 2023/02/16
- Re: Having an alias and a function with the same name leads to some sort of recursion, Dale R. Worley, 2023/02/17
- Re: Having an alias and a function with the same name leads to some sort of recursion, alex xmb ratchev, 2023/02/17
- Re: Having an alias and a function with the same name leads to some sort of recursion, Chet Ramey, 2023/02/17
- Re: Having an alias and a function with the same name leads to some sort of recursion, Oğuz İsmail Uysal, 2023/02/18
- Re: Having an alias and a function with the same name leads to some sort of recursion,
Chet Ramey <=
- Re: Having an alias and a function with the same name leads to some sort of recursion, Martin D Kealey, 2023/02/17
- Re: Having an alias and a function with the same name leads to some sort of recursion, Robert Elz, 2023/02/18