mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
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 `;'`
This commit is contained in:
parent
6ee835ed70
commit
dcacf620ab
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ elif [ "$BYOBU_SOURCED_PROFILE" != "1" ] && [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
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
|
# Source profile, if necessary
|
||||||
[ -z "$_byobu_sourced" ] && [ -r "$HOME/.profile" ] && . "$HOME/.profile"
|
[ -z "$_byobu_sourced" ] && [ -r "$HOME/.profile" ] && . "$HOME/.profile"
|
||||||
if byobu-launcher; then
|
if byobu-launcher; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue