* 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
This commit is contained in:
Dustin Kirkland 2013-08-02 17:27:55 -05:00
commit 953804c25f
3 changed files with 15 additions and 9 deletions

4
debian/changelog vendored
View file

@ -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 <kirkland@ubuntu.com> Sun, 28 Jul 2013 19:51:39 -0500

View file

@ -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

View file

@ -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" <<EOF
@ -40,7 +40,7 @@ EOF
;;
esac
if [ "$BYOBU_BACKEND" = "tmux" ]; then
if [ -n "$TMUX" ] && [ "$SHELL" = "/bin/bash" ]; then
tmux send-keys ". ~/.bashrc" \; send-keys Enter
else
echo