On 3/24/17 11:34 PM, Torka Noda wrote: > Bash Version: 4.4 > Patch Level: 12 > Release Status: release > > Description: > When sourcing a script (rather than executing it), if > the "in" keyword of a case construct is on its own line > (rather than on the first line of the construct with > "case", or on the same line as the first pattern), then > the pattern is expanded as an alias, if it exists.
This actually happens any time alias expansion is enabled, so sourcing this file from a script would not ordinarily trigger it, whereas sourcing it from an interactive shell, as I assume you did, will. Whether you source this from a script or put it directly into a script you execute, running `shopt -s expand_aliases' will trigger it. No matter how it's triggered, the code that implements Posix grammar rule 6 doesn't get executed at the right time, though the token IN still gets recognized, so the alias expansion is performed. This will be fixed in the next release of bash. 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://cnswww.cns.cwru.edu/~chet/