From 37586cdd60a3f10d608c466c9a4d3c342363f56e Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Wed, 23 Nov 2016 16:37:27 +0100 Subject: [PATCH] made default-command use the value of default-shell --- .tmux.conf | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 52e3dad..2608a36 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -28,9 +28,6 @@ bind e new-window -n '~/.tmux.conf.local' "sh -c '\${EDITOR:-vim} ~/.tmux.conf.l # reload configuration bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced' -# see https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard -if 'type -p reattach-to-user-namespace > /dev/null 2>&1' 'set -g default-command "exec $SHELL... 2> /dev/null & reattach-to-user-namespace $SHELL -l"' - # -- display ------------------------------------------------------------------- @@ -134,7 +131,7 @@ bind -t vi-copy H start-of-line bind -t vi-copy L end-of-line # copy to Mac OSX pasteboard -if -b 'type -p reattach-to-user-namespace > /dev/null 2>&1' 'bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"' +if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"' # -- user defined overrides ---------------------------------------------------- @@ -1012,6 +1009,13 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' # } # # _apply_configuration() { +# +# # see https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard +# if command -v reattach-to-user-namespace > /dev/null 2>&1; then +# default_shell="$(tmux show -gv default-shell)" +# tmux set -g default-command "exec $default_shell... 2> /dev/null & reattach-to-user-namespace $default_shell -l" +# fi +# # _apply_overrides # _apply_bindings # _apply_theme