usr/bin/byobu-launcher: prompt on nested screen connection, LP: #565398

This commit is contained in:
Dustin Kirkland 2010-04-19 08:56:49 -05:00
commit 1aa0b35f7f
2 changed files with 11 additions and 2 deletions

2
debian/changelog vendored
View file

@ -1,6 +1,6 @@
byobu (2.69) unreleased; urgency=low
* UNRELEASED
* usr/bin/byobu-launcher: prompt on nested screen connection, LP: #565398
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 15 Apr 2010 12:12:39 -0500

View file

@ -17,4 +17,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
[ ! -r "$HOME/.byobu/disable-autolaunch" ] && exec /usr/bin/byobu
if [ ! -r "$HOME/.byobu/disable-autolaunch" ]; then
if printf "$TERM" | grep -qs "screen"; then
printf "Do you want to launch byobu in a nested session? [y/N]: "
answer=$(head -n1)
if [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then
exec /usr/bin/byobu
fi
fi
fi
true