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    c...@case.edu    http://tiswww.cwru.edu/~chet/


Reply via email to