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

View File

@@ -13,7 +13,7 @@ set -g mouse-select-window on
set -g history-limit 10240
# Mac OS X fix for pbcopy, pbpaste, and launchctl
set-option -g default-command "safe-reattach-to-user-namespace -l $SHELL"
set-option -g default-command "login-shell"
# Load Theme
source-file "${HOME}/.tmux/themes/powerline-block-green.tmuxtheme"