~mtmiller/byobu/lp1411122

« back to all changes in this revision

Viewing changes to usr/bin/byobu-launcher.in

  • Committer: Dustin Kirkland
  • Date: 2015-01-12 23:27:24 UTC
  • Revision ID: dustin.kirkland@gmail.com-20150112232724-vuruyccbasyzu0a7
* debian/rules, usr/bin/byobu.in, usr/bin/byobu-launcher.in,
  usr/bin/ctail, usr/lib/byobu/include/select-session.py:
  - silence some checkbashisms false positives
  - handle nesting a bit differently
  - allow nesting, by default
  - detect the infinite loop situation, where we're ssh'ing into
    ourselves, and handle it gracefully
  - ensure we have access to 256 colors, even when nesting

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
                case "$TERM" in
31
31
                        *screen*)
32
32
                                # Handle nesting
33
 
                                if [ -n "$LC_BYOBU" ] && [ "$LC_BYOBU" -gt 1 ]; then
34
 
                                        # LC_BYOBU > 1, so user explicitly wants nested sessions
35
 
                                        exec $BYOBU_PREFIX/bin/byobu "$@"
 
33
                                if [ -n "$LC_BYOBU" ] && [ "$LC_BYOBU" -gt 0 ]; then
 
34
                                        # User explicitly wants nested sessions
 
35
                                        if [ -n "$SSH_CONNECTION" ] && [ "$(printf "$SSH_CONNECTION" | awk '{print $1}')" != "$(printf "$SSH_CONNECTION" | awk '{print $3}')" ]; then
 
36
                                                # Safeguard against ssh-ing into ourself, which causes an infinite loop
 
37
                                                exec $BYOBU_PREFIX/bin/byobu "$@"
 
38
                                        else
 
39
                                                true
 
40
                                        fi
36
41
                                else
37
42
                                        true
38
43
                                fi