mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
* usr/bin/byobu-launch: LP: #809525
- 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)
This commit is contained in:
parent
2bf22d7fbf
commit
de1de53452
3 changed files with 24 additions and 23 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -94,6 +94,10 @@ byobu (4.18) unreleased; urgency=low
|
||||||
usr/lib/byobu/menu, usr/lib/byobu/network,
|
usr/lib/byobu/menu, usr/lib/byobu/network,
|
||||||
usr/lib/byobu/updates_available, usr/share/byobu/keybindings/f-keys:
|
usr/lib/byobu/updates_available, usr/share/byobu/keybindings/f-keys:
|
||||||
- comprehensively use $SED for MacOSX compatibility, LP: #812973
|
- comprehensively use $SED for MacOSX compatibility, LP: #812973
|
||||||
|
* usr/bin/byobu-launch: LP: #809525
|
||||||
|
- 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)
|
||||||
|
|
||||||
[ James Spencer ]
|
[ James Spencer ]
|
||||||
* usr/lib/byobu/.constants:
|
* usr/lib/byobu/.constants:
|
||||||
|
|
|
@ -17,12 +17,9 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
# 1) Prevent recursion, and multiple sourcing of profiles with the BYOBU_SOURCED_PROFILE environment variable.
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
# 2) Respect environment variables (LC_BYOBU and BYOBU_DISABLE) passable over SSH to disable
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/.common"
|
# Byobu launch. This puts that configurability on the SSH client,
|
||||||
|
|
||||||
# Respect an environment variable passable over SSH to disable
|
|
||||||
# Byobu launch. This put that configurability on the SSH client,
|
|
||||||
# in addition to the server.
|
# in addition to the server.
|
||||||
# To use over SSH, your /etc/ssh/sshd_config and /etc/ssh/ssh_config
|
# To use over SSH, your /etc/ssh/sshd_config and /etc/ssh/ssh_config
|
||||||
# must pass this variable with AcceptEnv and SendEnv.
|
# must pass this variable with AcceptEnv and SendEnv.
|
||||||
|
@ -32,17 +29,18 @@ PKG="byobu"
|
||||||
# $HOME/.bashrc: export LC_BYOBU=0
|
# $HOME/.bashrc: export LC_BYOBU=0
|
||||||
# or edit your sshd_config, ssh_config, and set:
|
# or edit your sshd_config, ssh_config, and set:
|
||||||
# $HOME/.bashrc: export BYOBU_DISABLE=1
|
# $HOME/.bashrc: export BYOBU_DISABLE=1
|
||||||
if [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_DISABLE" != "1" ]; then
|
if [ "$BYOBU_SOURCED_PROFILE" != "1" ] && [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_DISABLE" != "1" ]; then
|
||||||
|
BYOBU_SOURCED_PROFILE=1
|
||||||
|
PKG="byobu"
|
||||||
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
|
. "${BYOBU_PREFIX}/lib/${PKG}/.common"
|
||||||
case "$-" in
|
case "$-" in
|
||||||
*i*)
|
*i*)
|
||||||
# Attempt to merge shell history across sessions/windows (works with a few exceptions)
|
# Attempt to merge shell history across sessions/windows (works with a few exceptions)
|
||||||
shopt -s histappend || true
|
shopt -s histappend || true
|
||||||
[ -n "$PROMPT_COMMAND" ] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"
|
[ -n "$PROMPT_COMMAND" ] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"
|
||||||
# Source profile, as long as we won't recurse
|
# Source profile
|
||||||
if [ -r "$HOME/.profile" ] && [ "$BYOBU_SOURCED_PROFILE" != "1" ]; then
|
[ -r "$HOME/.profile" ] && . "$HOME/.profile"
|
||||||
BYOBU_SOURCED_PROFILE=1
|
|
||||||
. "$HOME/.profile"
|
|
||||||
fi
|
|
||||||
if byobu-launcher; then
|
if byobu-launcher; then
|
||||||
# Wait very briefly for the no-logout flag to get written?
|
# Wait very briefly for the no-logout flag to get written?
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
|
@ -58,5 +56,4 @@ if [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_DISABLE" != "1" ]; then
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
true
|
true
|
||||||
|
|
||||||
# vi: syntax=sh ts=4 noexpandtab
|
# vi: syntax=sh ts=4 noexpandtab
|
||||||
|
|
|
@ -42,7 +42,7 @@ update_flag() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_launcher() {
|
install_launcher() {
|
||||||
printf ". \$(which byobu-launch)\n" >> "$1"
|
printf ". byobu-launch\n" >> "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sanitize the environment
|
# Sanitize the environment
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue