Ticket #4599 (accepted defect)

Opened 5 days ago

Last modified 5 days ago

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

array-PROMPT_COMMAND.patch (1.9 KB) - added by ceamac 5 days ago.

Change History

Changed 5 days ago by ceamac

comment:1 Changed 5 days ago by zaytsev

  • Owner set to zaytsev
  • Status changed from new to accepted
  • Milestone changed from Future Releases to 4.8.33
Note: See TracTickets for help on using tickets.