On 5/14/19 5:57 PM, Yu Kou wrote: > Bash Version: 5.0 > Patch Level: 2 > Release Status: release > > Description: > This bug was found in bash 4.4.12 (GNU bash, version > 4.4.12(1)-release (x86_64-pc-linux-gnu)) > It is still here in bash 5.0.2. > > I pubilshed it first in this page, > > https://unix.stackexchange.com/questions/406674/bash-why-is-alias-after-newline-ignored-when-run-remotely#407064 > > This is a bug of option '-c'. > > It can be reproduced with the command below, > > bash -c "shopt -s expand_aliases &>/dev/null; > alias myalias='echo foo > echo bar > echo baz' > myalias > > I expect it to output such three lines as follows, > foo > bar > baz > > But only 'foo' will be output.
Thanks for the report and analysis. It's a simple fix. Chet -- ``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/