[tmux] fix immediate exit on Linux

The fix in commit 6bd38b874978e96dc2632abf1c98460e908fa6a6 causes tmux
to exit immediately when running on Linux, since the
reattach-to-user-namespace is specific to MacOS and the binary is
therefore not available on Linux.

More details at:

    http://www.economyofeffort.com/2013/07/29/reattach-to-user-namespace-the-fix-for-your-tmux-in-os-x-woes/
This commit is contained in:
Fernando Schauenburg 2018-03-28 15:21:16 +02:00
parent 3e64d54317
commit 318c2c46ea
2 changed files with 9 additions and 1 deletions

5
tmux-macos.conf Normal file
View file

@ -0,0 +1,5 @@
# Fix for clipboard in vim running inside tmux:
# See http://stackoverflow.com/a/40154047
# See https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
set -g default-command "reattach-to-user-namespace -l $SHELL"

View file

@ -24,7 +24,6 @@ bind -r C-j resize-pane -D 5
bind -r C-k resize-pane -U 5 bind -r C-k resize-pane -U 5
bind -r C-l resize-pane -R 5 bind -r C-l resize-pane -R 5
# #
# General # General
# #
@ -61,3 +60,7 @@ setw -g window-status-current-bg default
set -g pane-border-fg colour0 # Base02 set -g pane-border-fg colour0 # Base02
set -g pane-active-border-fg colour9 # Orange set -g pane-active-border-fg colour9 # Orange
# Apply platform specific configurations:
# See http://www.economyofeffort.com/2013/07/29/reattach-to-user-namespace-the-fix-for-your-tmux-in-os-x-woes/
if-shell 'test "$(uname)" = "Darwin"' 'source ~/.tmux-macos.conf'