[vte] vte.sh: Fix the check for PROMPT_COMMAND when it is unset
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] vte.sh: Fix the check for PROMPT_COMMAND when it is unset
- Date: Sat, 25 Sep 2021 08:51:13 +0000 (UTC)
commit 2e0ae811fdea963ce0709eaedf14b8b7697908f7
Author: Christian Persch <chpe src gnome org>
Date: Sat Sep 25 10:50:29 2021 +0200
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
src/vte.sh.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]