Ticket #4599 (accepted defect)
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: | no branch | Votes for changeset: |
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
Note: See
TracTickets for help on using
tickets.