Ticket #4599 (closed defect: fixed)
Add support for bash PROMPT_COMMAND being an array
Reported by: | ceamac | Owned by: | zaytsev |
---|---|---|---|
Priority: | minor | Milestone: | 4.8.33 |
Component: | mc-core | Version: | master |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master |
Description
Starting with bash 5.1, PROMPT_COMMAND can be an array. Detect this
case and append and entry to the array instead of appending to a string.
The current behaviour is appending the string to the first element in the array.
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). Tested with bash 1.14.
Attachments
Change History
comment:1 Changed 6 weeks ago by zaytsev
- Owner set to zaytsev
- Status changed from new to accepted
- Milestone changed from Future Releases to 4.8.33
comment:2 Changed 4 weeks ago by zaytsev
- Branch state changed from no branch to on review
Branch: 4599_bash_prompt_array
Changeset: 18f0a28501340c384422864125b53942d792cac7
Thank you for upstream-friendly forwarding and quality patch.
comment:4 Changed 3 weeks ago by andrew_b
- Votes for changeset set to andrew_b
- Branch state changed from on review to approved
comment:5 Changed 3 weeks ago by zaytsev
- Status changed from accepted to testing
- Votes for changeset changed from andrew_b to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged
Merged to master: d63427d7bdd96c95172e6eac27c6e5e0f949ab77 .
Thank you!