* usr/bin/byobu-launch: LP: #802646

- ensure that .profile gets sourced if launching byobu by default,
    but also make sure that we won't recurse!
This commit is contained in:
Dustin Kirkland 2011-06-28 22:44:32 +00:00
commit b7f8ed124f
2 changed files with 7 additions and 1 deletions

4
debian/changelog vendored
View file

@ -1,6 +1,8 @@
byobu (4.17) unreleased; urgency=low
* UNRELEASED
* usr/bin/byobu-launch: LP: #802646
- ensure that .profile gets sourced if launching byobu by default,
but also make sure that we won't recurse!
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 27 Jun 2011 14:14:17 +0000

View file

@ -37,6 +37,10 @@ if [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_DISABLE" != "1" ]; then
# Attempt to merge shell history across sessions/windows (works with a few exceptions)
shopt -s histappend || true
[ -n "$PROMPT_COMMAND" ] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"
# Source profile, as long as we won't recurse
if [ -r "$HOME/.profile" ]; then
(sed -e "s/#.*//" "$HOME/.profile" | grep -qs "$PKG-launch") || . "$HOME/.profile"
fi
if byobu-launcher; then
# Wait very briefly for the no-logout flag to get written?
sleep 0.1