diff --git a/debian/changelog b/debian/changelog index 6c481c12..0a883599 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,10 @@ byobu (5.50) unreleased; urgency=low - use a common get_distro function in a couple of places * usr/lib/byobu/wifi_quality, usr/share/man/man1/byobu.1: - make wifi status a little easier to read + * usr/bin/byobu-disable-prompt, usr/bin/byobu-enable-prompt: + - ensure we're in a tmux shell + - ensure we're in a bash shell + - don't double-reload -- Dustin Kirkland Sun, 28 Jul 2013 19:51:39 -0500 diff --git a/usr/bin/byobu-disable-prompt b/usr/bin/byobu-disable-prompt index f39330ac..efd4c387 100755 --- a/usr/bin/byobu-disable-prompt +++ b/usr/bin/byobu-disable-prompt @@ -24,13 +24,15 @@ PKG="byobu" $BYOBU_SED -i -e "/#byobu-prompt#$/d" "$HOME/.bashrc" -if [ "$BYOBU_BACKEND" = "tmux" ]; then - tmux send-keys ". ~/.bashrc" \; send-keys Enter -else - echo - echo "You will need to reload your shell configuration for this to take effect..." - echo " . ~/.bashrc" - echo +if [ "$1" != "--no-reload" ]; then + if [ -n "$TMUX" ] && [ "$SHELL" = "/bin/bash" ]; then + tmux send-keys ". ~/.bashrc" \; send-keys Enter + else + echo + echo "You will need to reload your shell configuration for this to take effect..." + echo " . ~/.bashrc" + echo + fi fi # vi: syntax=sh ts=4 noexpandtab diff --git a/usr/bin/byobu-enable-prompt b/usr/bin/byobu-enable-prompt index 1867ea0e..8d8e717f 100755 --- a/usr/bin/byobu-enable-prompt +++ b/usr/bin/byobu-enable-prompt @@ -24,7 +24,7 @@ PKG="byobu" get_distro DISTRO="$_RET" -byobu-disable-prompt || true +byobu-disable-prompt --no-reload || true case $DISTRO in Ubuntu*) cat >>"$HOME/.bashrc" <