4 ms·
Tab autocompletion looks to be affected too, at least on my system. Create a branch called 'complete_$(./foo)'. Then type 'git checkout comp<TAB>'. This gets
by abbeyj 10y ago
Tab autocompletion looks to be affected too, at least on my system. Create a branch called 'complete_$(./foo)'. Then type 'git checkout comp<TAB>'. This gets autocompleted to
git checkout complete_$(./foo)
If you hit Enter at this point without thinking you'll end up running './foo'. It should have expanded instead to something like
git checkout 'complete_$(./foo)'
or
git checkout complete_\$\(./foo\)
- oconnor663 10y agoZsh seems to do the escaping correctly there.
- junkblocker 10y agoConfirming what GP said on version 5.3.1, not seeing any escaping git checkout <Tab> git checkout $(./pwd)
- simplehuman 10y agoI can confirm as well
- Freaky 10y agoEscaped here. How are you configuring your completion? -% zsh -f voi% echo $ZSH_VERSION 5.3.1 voi% autoload -U compinit voi% compinit voi% git checkout <tab><tab>\$\(./pw3n\) Already on '$(./pw3n)' Your branch is up-to-date with 'origin/$(./pw3n)'. voi% git checkout com<tab>plete_\$\(./foo\) Switched to branch 'complete_$(./foo)'