Having an alias and a function with the same name leads to some sort of recursion

2023-01-02 Thread Yuri Kanivetsky
Hi, #!/usr/bin/env bash set -eu alias cmd=echo cmd() { echo "$@" } set -x cmd a b c $ ./a.sh + echo a b c + echo a b c ... + echo a b c + echo a b c Command terminated Sounds like a bug. I'd expect it to notice the alias, turn "cmd a b c" into "echo a b c" and print the letters. Regards, Y

Re: Having an alias and a function with the same name leads to some sort

2023-01-05 Thread Yuri Kanivetsky
Indeed, it appears I enabled expand_aliases. I'll probably reconsider it.

One IFS non-whitespace is stripped at the end of a word during word splitting

2024-12-08 Thread Yuri Kanivetsky
Hi, I was trying to understand the part of the documentation on word splitting. I realized that without some experiments: https://gist.github.com/x-yuri/6c6b375e7b0721a323960baaedf2a649 I wasn't sure I understood it correctly. And one of the experiments revealed that: $ bash -c 'IFS=x; a=xa; f(

Re: bash doesn't build with gcc 14.x

2024-12-07 Thread Yuri Kanivetsky
On Sat, Dec 7, 2024 at 7:50 PM Chet Ramey wrote: > Since you're building in a docker container, or, more specifically, > without ncurses or any kind of termcap/termlib support, it might be > better to run > > ./configure --disable-readline > > The ancient termcap library in lib/termcap is

bash doesn't build with gcc 14.x

2024-12-06 Thread Yuri Kanivetsky
gcc 14.1.0 turned -Wimplicit-function-declaration into an error: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=55e94561e97ed0bce4774aa1c6b5d5d82209a379 https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a1adce82c17577aeaaf6b9736ca8a1455d1164cb The bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi

Re: bash doesn't build with gcc 14.x

2024-12-06 Thread Yuri Kanivetsky
Meanwhile the workaround is: ./configure CFLAGS=-Wno-implicit-function-declaration && make