FS#71002 - [bash] /etc/bash.bashrc: Use PROMPT_COMMAND as array

Attached to Project: Arch Linux
Opened by Gamma _ (GammaFn) - Monday, 24 May 2021, 14:00 GMT
Last edited by Tobias Powalowski (tpowa) - Sunday, 05 February 2023, 09:03 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Felix Yan (felixonmars)
Levente Polyak (anthraxx)
Giancarlo Razzolini (grazzolini)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

With Bash 5.1+, PROMPT_COMMAND can now be an array. We should
use it as an array instead of appending to it as a scalar, which
can be fragile. A knock-on effect of scalar PROMPT_COMMAND was
discovered in community/toolbox:

- https://github.com/containers/toolbox/pull/716

Additional info:
* 5.1.008-1

Steps to reproduce:

TERM='xterm' PROMPT_COMMAND=' ' bash

Suggested fix: Replace the existing PROMPT_COMMAND scalar definitions with array definitions:

PROMPT_COMMAND+=('printf ...')
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Sunday, 05 February 2023, 09:03 GMT
Reason for closing:  Fixed
Additional comments about closing:  5.1.016-2
Comment by Tobias Powalowski (tpowa) - Tuesday, 31 January 2023, 19:19 GMT
fixed on trunk.
Comment by Tobias Powalowski (tpowa) - Tuesday, 31 January 2023, 20:53 GMT
bash-5.1.016-2

Loading...