• Christoph Anton Mitterer's avatar
    use bash’s PROMPT_COMMAND as array · 06431d0e
    Christoph Anton Mitterer authored
    Previously, PROMPT_COMMAND was simply overwritten possibly breaking anything
    already added to it.
    Bash may use PROMPT_COMMAND as an array.
    By adding the VTE command via an array compound assignment with the += operator,
    a PROMPT_COMMAND that has already been set as a (plain) parameter would be
    converted to an indexed array and appended.
    This would not work with an associative array (but fail gracefully), but at
    least in current versions of bash (5.1.8 as of now), these cannot be used
    properly for PROMPT_COMMAND anyway.
vte.sh.in 1.36 KB