* usr/bin/byobu-launch:

- move the location of the BYOBU_DISABLE test
This commit is contained in:
Dustin Kirkland 2011-05-28 12:41:21 -05:00
commit 028d8c6d3c
2 changed files with 32 additions and 25 deletions

2
debian/changelog vendored
View file

@ -7,6 +7,8 @@ byobu (4.6) unreleased; urgency=low
- seems that ctrl-F6 doesn't work in tty right now - seems that ctrl-F6 doesn't work in tty right now
* usr/bin/byobu-launch: * usr/bin/byobu-launch:
- merge history - merge history
* usr/bin/byobu-launch:
- move the location of the BYOBU_DISABLE test
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 26 May 2011 15:14:52 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Thu, 26 May 2011 15:14:52 -0500

View file

@ -19,30 +19,35 @@
PKG="byobu" PKG="byobu"
DATA="$HOME/.$PKG" DATA="$HOME/.$PKG"
case "$-" in
*i*) # Respect a BYOBU_DISABLE environment variable
# Attempt to merge history across screen sessions/windows (works with a few exceptions) # To use over SSH, you must:
shopt -s histappend || true # 1) On your remote SSH server (might be handled by your distro):
[ -n "$PROMPT_COMMAND" ] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a" # /etc/ssh/sshd_config:
# Respect a BYOBU_DISABLE environment variable # AcceptEnv LANG LC_* BYOBU_DISABLE
# To use over SSH, you must: # 2) On your local SSH client (might be handled by your distro):
# 1) On your remote SSH server (might be handled by your distro): # /etc/ssh/ssh_config:
# /etc/ssh/sshd_config: AcceptEnv LANG LC_* BYOBU_DISABLE # SendEnv LANG LC_* BYOBU_DISABLE
# 2) On your local SSH client (might be handled by your distro): # 3) And in your local bashrc:
# /etc/ssh/ssh_config: SendEnv LANG LC_* BYOBU_DISABLE # $HOME/.bashrc: export BYOBU_DISABLE=1
# 3) And in your local bashrc: if [ "$BYOBU_DISABLE" != 1 ]; then
# $HOME/.bashrc: export BYOBU_DISABLE=1 case "$-" in
if [ "$BYOBU_DISABLE" != "1" ] && byobu-launcher; then *i*)
# Wait very briefly for the no-logout flag to get written? # Attempt to merge shell history across sessions/windows (works with a few exceptions)
sleep 0.1 shopt -s histappend || true
if [ -e "$DATA/no-logout-on-detach" ] || [ -e "/var/run/screen/S-$USER/byobu.no-logout" ]; then [ -n "$PROMPT_COMMAND" ] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"
# The user does not want to logout on byobu detach if byobu-launcher; then
rm -f "/var/run/screen/S-$USER/byobu.no-logout" # Remove one-time no-logout flag, if it exists # Wait very briefly for the no-logout flag to get written?
true sleep 0.1
else if [ -e "$DATA/no-logout-on-detach" ] || [ -e "/var/run/screen/S-$USER/byobu.no-logout" ]; then
exit 0 # The user does not want to logout on byobu detach
rm -f "/var/run/screen/S-$USER/byobu.no-logout" # Remove one-time no-logout flag, if it exists
true
else
exit 0
fi
fi fi
fi ;;
;; esac
esac fi
true true