mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
usr/bin/byobu: allow users to specify their own -S, LP: #610134
This commit is contained in:
parent
674e06dddb
commit
ef857c4364
2 changed files with 9 additions and 4 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -1,6 +1,6 @@
|
|||
byobu (2.83) unreleased; urgency=low
|
||||
|
||||
* UNRELEASED
|
||||
* usr/bin/byobu: allow users to specify their own -S, LP: #610134
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 07 Jul 2010 11:36:03 -0400
|
||||
|
||||
|
|
|
@ -65,12 +65,17 @@ if [ -S "$SSH_AUTH_SOCK" ] && [ ! -h "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then
|
|||
fi
|
||||
|
||||
PROFILE="-c /usr/share/$PKG/profiles/byoburc"
|
||||
NAME="-S $PKG"
|
||||
# Zero out $NAME if user has specified a -S
|
||||
for i in $@; do
|
||||
case $i in -S) NAME= ;; esac
|
||||
done
|
||||
# Now let's execute screen!
|
||||
if [ "$#" = "0" ]; then
|
||||
out=$(screen -wipe 2>/dev/null) || true
|
||||
if [ "$CUSTOM_WINDOW_SET" = "1" ]; then
|
||||
# Start new custom window set session
|
||||
exec screen $SCREEN_TERM -S $PKG $PROFILE
|
||||
exec screen $SCREEN_TERM $NAME $PROFILE
|
||||
else
|
||||
case "$out" in
|
||||
*\(*\)*)
|
||||
|
@ -79,11 +84,11 @@ if [ "$#" = "0" ]; then
|
|||
;;
|
||||
*)
|
||||
# Start new default session
|
||||
exec screen $SCREEN_TERM -S $PKG $PROFILE $DEFAULT_WINDOW
|
||||
exec screen $SCREEN_TERM $NAME $PROFILE $DEFAULT_WINDOW
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
# Launch with command line args
|
||||
exec screen $SCREEN_TERM -S $PKG $PROFILE "$@"
|
||||
exec screen $SCREEN_TERM $NAME $PROFILE "$@"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue