[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Probable recursion in particular alias
From: |
Chet Ramey |
Subject: |
Re: Probable recursion in particular alias |
Date: |
Wed, 9 Jan 2019 10:10:38 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 1/9/19 1:24 AM, Ante Perić wrote:
> Bash Version: 5.0
> Patch Level: 0
> Release Status: release
>
> Description:
> Having an alias of type:
> alias bug="\
> echo \"no output, 100% cpu\" \
> "
> in .bashrc will give no output, will not complete, and it will peg the CPU to
> 100%.
>
> Repeat-By:
> Just run the alias as specified in Description section.
I can't reproduce this in non-interactive or interactive shells. Given
this file:
$ cat x18
shopt -s expand_aliases
alias bug="\
echo \"no output, 100% cpu\" \
"
bug
bug 1234
I get (non-interactive):
$ ../bash-5.0/bash ./x18
no output, 100% cpu
no output, 100% cpu 1234
and (interactive):
$ ../bash-5.0/bash --rcfile ./x18
no output, 100% cpu
no output, 100% cpu 1234
$ bug
no output, 100% cpu
$ bug 1234
no output, 100% cpu 1234
$ echo $BASH_VERSION
5.0.0(1)-release
--
``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/