Created
December 16, 2016 00:21
-
-
Save Blaok/05d3289c0526bd9348b3fdc2722dccd2 to your computer and use it in GitHub Desktop.
make sure different verions of tmux opens new window in the same directory as the previous window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if-shell 'COMPARE_VERSION=1.8;CURRENT_VERSION=$(tmux -V);CURRENT_VERSION=${CURRENT_VERSION//tmux /};(( ${COMPARE_VERSION%%.*} < ${CURRENT_VERSION%%.*} || ( ${COMPARE_VERSION%%.*} == ${CURRENT_VERSION%%.*} && ${COMPARE_VERSION##*.} < ${CURRENT_VERSION##*.} ) ))' \ | |
'bind c new-window -c "#{pane_current_path}"; bind C-c new-window -c "#{pane_current_path}"; bind | split-window -h -c "#{pane_current_path}"; bind - split-window -v -c "#{pane_current_path}"'\ | |
'bind c new-window; bind C-c new-window; bind | split-window -h; bind - split-window -v' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment