Re: aliases sometimes not expanded even with expand_aliases set

2024-10-17 Thread Chet Ramey
On 10/16/24 7:34 PM, Ian Dall wrote: Thanks for that. It is certainly confusing that you can do "alias -p" inside the compound statement and have it print out the alias you think you have defined, but not have it work. By the time the alias command executes, and prints the alias definition,

Re: aliases sometimes not expanded even with expand_aliases set

2024-10-16 Thread Ian Dall
Thanks for that. It is certainly confusing that you can do "alias -p" inside the compound statement and have it print out the alias you think you have defined, but not have it work. But given that bit of the manual, I can see why that would be. On Sat, 2024-10-12 at 15:18 -0400, Chet Ramey wro

Re: aliases sometimes not expanded even with expand_aliases set

2024-10-12 Thread Chet Ramey
On 10/12/24 9:31 AM, i...@beware.dropbear.id.au wrote: Bash Version: 5.2 Patch Level: 26 Release Status: release Description: In the following script, the first alias fails with "comand not found" but the second works. This is covered in the manual (bash.1): Bash always reads at le

Re: aliases sometimes not expanded even with expand_aliases set

2024-10-12 Thread Greg Wooledge
On Sun, Oct 13, 2024 at 00:01:10 +1030, i...@beware.dropbear.id.au wrote: > In the following script, the first alias fails with "comand not found" > but the second works. > > #!/bin/bash > > shopt -s expand_aliases > > if :; then > alias foo='ec

aliases sometimes not expanded even with expand_aliases set

2024-10-12 Thread ian
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_A