Further enhance tmux's default command

This commit is contained in:
2013-08-25 09:25:15 +00:00
parent 3838db8f7b
commit 3470b1632f
2 changed files with 13 additions and 1 deletions

12
bin/login-shell Executable file
View File

@@ -0,0 +1,12 @@
#! /usr/bin/env bash
# Ensure that tmux windows are by default named after the shell, rather than
# full path to the shell binary.
shell=$(basename "$SHELL")
# If reattach-to-user-namespace is not available, just run the command.
if [ -n "$(command -v reattach-to-user-namespace)" ]; then
reattach-to-user-namespace -l "$shell"
else
exec "$shell"
fi