diff options
author | Christian Persch <chpe@src.gnome.org> | 2021-09-25 10:50:29 +0200 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2021-09-25 10:50:29 +0200 |
commit | 2e0ae811fdea963ce0709eaedf14b8b7697908f7 (patch) | |
tree | c2c007124fba0c54c3b81ba23743d0e9b1fe6cc2 | |
parent | 0178c1b0a3d2c162bfddcd161ab55f4ff79b1ab4 (diff) | |
download | vte-2e0ae811fdea963ce0709eaedf14b8b7697908f7.tar.gz |
vte.sh: Fix the check for PROMPT_COMMAND when it is unset
declare "helpfully" outputs on stdout for existing variables, but on stderr
for nonexistent ones.
Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/37
-rw-r--r-- | src/vte.sh.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vte.sh.in b/src/vte.sh.in index 1aa40ba4..242d6c42 100644 --- a/src/vte.sh.in +++ b/src/vte.sh.in @@ -48,7 +48,7 @@ if [[ -n "${BASH_VERSION:-}" ]]; then # On older bash, we can only overwrite the whole PROMPT_COMMAND, so must # use the __vte_prompt_command function which also sets the title. - if [[ "$(declare -p PROMPT_COMMAND)" =~ "declare -a" ]]; then + if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then PROMPT_COMMAND+=(__vte_osc7) else PROMPT_COMMAND="__vte_prompt_command" |