On 8/27/21 9:47 PM, Dale R. Worley wrote:
Hyunho Cho <mug...@gmail.com> writes:
but if i use alias then '>' prompt does not appear and default bash
prompt appears
bash$ alias myalias='{ cat <<\@ > foo ;} 2> /dev/null'
bash$ myalias
bash$ 111
bash$ 222 # bash$ prompt
bash$ @
I don't know the details, but it must have something to do with what
event triggers the reading of the here-document. That event isn't the
execution of the command containing it, I don't think, but more like
when the here-document-redirection is parsed.
This is substantially correct. When the parser goes and collects the body
of the here-document, it's still parsing the contents of the alias.
--
``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/