From dcacf620ab8d1c4dd42cc2c4840008d12044e772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=A4der?= Date: Mon, 29 Apr 2013 11:49:04 +0300 Subject: [PATCH] fix building wrong PROMPT_COMMAND If one previously declared a perfectly valid `PROMPT_COMMAND` like `PROMPT_COMMAND="do_something;"`, *byobu* would have corrupted it: `PROMPT_COMMAND="$PROMPT_COMMAND;history -a;history -r"` resulted in `"do_something;;history -a;history -r"`, and the double semicolons are illegal: `bash: PROMPT_COMMAND: line 0: syntax error near unexpected token `;'` --- usr/bin/byobu-launch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/bin/byobu-launch b/usr/bin/byobu-launch index 3a4e939d..025c9aff 100755 --- a/usr/bin/byobu-launch +++ b/usr/bin/byobu-launch @@ -58,7 +58,7 @@ elif [ "$BYOBU_SOURCED_PROFILE" != "1" ] && [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_ esac fi done - [ -n "$PROMPT_COMMAND" ] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a;history -r" || PROMPT_COMMAND="history -a;history -r" + PROMPT_COMMAND="history -a;history -r;$PROMPT_COMMAND" # Source profile, if necessary [ -z "$_byobu_sourced" ] && [ -r "$HOME/.profile" ] && . "$HOME/.profile" if byobu-launcher; then