bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Option '-c' has bug when compile-time config 'ONESHOT' is enabled


From: Chet Ramey
Subject: Re: Option '-c' has bug when compile-time config 'ONESHOT' is enabled
Date: Wed, 15 May 2019 10:47:28 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]