Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ticket #4599: add support for bash PROMPT_COMMAND being an array
Starting with bash 5.1, PROMPT_COMMAND can be an array. Detect this case and append an entry to the array instead of appending to a string. Testing for bash >= 5 is sufficient, because the @A operator exists in 5.0. We need eval on the "then" branch because bash 1.x cannot even parse that line (it does not support arrays). Bug: https://bugs.gentoo.org/930401 Suggested-by: kfm@plushkava.net Signed-off-by: Viorel Munteanu <ceamac@gentoo.org> Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
- Loading branch information