Skip to content

Instantly share code, notes, and snippets.

@Blaok
Created December 16, 2016 00:21
Show Gist options
  • Save Blaok/05d3289c0526bd9348b3fdc2722dccd2 to your computer and use it in GitHub Desktop.
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
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