diff --git a/debian/changelog b/debian/changelog index a5587933..5a00cc4f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -98,6 +98,8 @@ byobu (4.18) unreleased; urgency=low - no need to search path on sourcing (thanks, Scott Moser) * usr/bin/byobu-launcher-install: LP: #809525 - prevent profile from getting sourced twice (thanks, Scott Moser) + * usr/bin/byobu-launch: LP: #806609 + - support zsh history append [ James Spencer ] * usr/lib/byobu/.constants: diff --git a/usr/bin/byobu-launch b/usr/bin/byobu-launch index 82a8d3cf..a659c960 100755 --- a/usr/bin/byobu-launch +++ b/usr/bin/byobu-launch @@ -37,7 +37,12 @@ if [ "$BYOBU_SOURCED_PROFILE" != "1" ] && [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_DI case "$-" in *i*) # Attempt to merge shell history across sessions/windows (works with a few exceptions) - shopt -s histappend || true + if command -v shopt >/dev/null; then + shopt -s histappend || true + elif command -v setopt >/dev/null; then + # Support zsh too + setopt appendhistory + fi [ -n "$PROMPT_COMMAND" ] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a" # Source profile [ -r "$HOME/.profile" ] && . "$HOME/.profile"