Note: - If using app-shell/bash-5.2_alpha , the emerge command bash completion, would not able to work. - if using app-shells/bash-5.1_p16, everything is fine. The error message would be: # . /usr/share/bash-completion/completions/emerge bash: /usr/share/bash-completion/completions/emerge: line 146: syntax error near unexpected token `${COMPREPLY/ ${i%% *} / }' bash: /usr/share/bash-completion/completions/emerge: line 146: ` COMPREPLY=(${COMPREPLY/ ${i%% *} / })' bash: /usr/share/bash-completion/completions/emerge: line 147: syntax error near unexpected token `done' bash: /usr/share/bash-completion/completions/emerge: line 147: ` done' Since this bash completion script, is in app-shells/gentoo-bashcomp package, some modify might get needed, so it would also work in 5.2 version of bash.
I'm fairly sure this is fixed upstream since but we need to wait until the next testing version is out (beta is next). I did ask for a new alpha but was told to wait for the beta.
Beta is now in tree, works fine for me now.
Hi @Sam, it looks the bug is still there on my end, today i upgrade bash to 5.2_beta, and the issue is still there. Output is: # bash -version GNU bash, version 5.2.0(1)-beta (x86_64-pc-linux-gnu) Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. # . /usr/share/bash-completion/completions/emerge bash: /usr/share/bash-completion/completions/emerge: line 146: syntax error near unexpected token `${COMPREPLY/ ${i%% *} / }' bash: /usr/share/bash-completion/completions/emerge: line 146: ` COMPREPLY=(${COMPREPLY/ ${i%% *} / })' bash: /usr/share/bash-completion/completions/emerge: line 147: syntax error near unexpected token `done' bash: /usr/share/bash-completion/completions/emerge: line 147: ` done' Seems like exact the previous error message in alpha version right?
(In reply to Sam James from comment #2) > Beta is now in tree, works fine for me now. Refer the previous update
hi! Ah, I'd assumed it was the same issue I'd hit. Could you try bash-9999 (in a safe environment with backups, obviously, not a production system) and then if that fails, let me know, and also report it upstream using 'bashbug'?
(In reply to Sam James from comment #5) > hi! Ah, I'd assumed it was the same issue I'd hit. > > Could you try bash-9999 (in a safe environment with backups, obviously, not > a production system) and then if that fails, let me know, and also report it > upstream using 'bashbug'? Thanks for reporting it. In the latest bash git commit (https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=d0cd67ee13930ade6d926e3387551b79e8c5be37): ``` + - parse_comsub: non-interactive shells exit on a syntax error while + parsing the command substitution + - parse_comsub: unset additional PARSER_STATE flags before calling + yyparse(). Inspired by https://bugs.gentoo.org/837203; unsetting + PST_COMPASSIGN is the fix for that bug ``` \o/