Escape the % in the tmux select-pane -t command to prevent process substitution by fish #150

Merged
merged 2 commits into from Sep 3, 2016

Projects

None yet

2 participants

@scolby33
Contributor
scolby33 commented Sep 2, 2016

Re #148

@blueyed blueyed and 1 other commented on an outdated diff Sep 2, 2016
plugin/tmux_navigator.vim
@@ -78,7 +78,7 @@ function! s:TmuxAwareNavigate(direction)
catch /^Vim\%((\a\+)\)\=:E141/ " catches the no file name error
endtry
endif
- let args = 'select-pane -t ' . $TMUX_PANE . ' -' . tr(a:direction, 'phjkl', 'lLDUR')
+ let args = 'select-pane -t \' . $TMUX_PANE . ' -' . tr(a:direction, 'phjkl', 'lLDUR')
@blueyed
blueyed Sep 2, 2016 Collaborator

What about let args = 'select-pane -t ' . shellescape($TMUX_PANE) . ' -' . tr(a:direction, 'phjkl', 'lLDUR') instead?

@blueyed
blueyed Sep 2, 2016 Collaborator

i.e. use shellescape() instead of the backslash.

@scolby33
scolby33 Sep 2, 2016 Contributor

Good call. It seems that enclosing in quotes works as well as escaping with \.

@scolby33
Contributor
scolby33 commented Sep 2, 2016 edited

Let me know if you would prefer that I squash commits before you merge.

@blueyed
Collaborator
blueyed commented Sep 3, 2016

👍

I prefer it squashes, yes.

But we can do so from the GitHub UI. Feel free to force-push what you like, of course.

Please ping me - giving also time for @christoomey to chime in, but I think this is good to fly.

@blueyed blueyed merged commit e79d4c0 into christoomey:master Sep 3, 2016
@blueyed
Collaborator
blueyed commented Sep 3, 2016

🎆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment