threads / discuss / 49311

zsh completion does not support branches with quotes/apostrophes

Subject: zsh completion does not support branches with quotes/apostrophes

## tl;dr

One message between Sep 10, 2018 and Sep 10, 2018.

replies: 0people: 1as markdown or json

Vasily Korytov· Sep 10, 2018, 15:02 UTC · lore
Hi,
I have the latest git and it includes a nice auto-completion for zsh: contrib/completion/git-completion.zsh

I’ve been using it happily for.. years I guess, until I ran into a problem yesterday. I have a branch with apostrophe, named like: somebody's_business

When I want to switch to that branch, I type: git checkout some[tab] and the result is: `git checkout somebody's_business` (and that does not work in zsh, of course). For this to work it should escape the apostrophe and the completion should result it: git checkout somebody\'s_business

When I try to use the quotes in the parameters, this does not work at all: i.e. when I type `git checkout -b “some[tab]` nothing is completed.

So the only work-around for now seems to be manually fixing the completion results, escaping the quote. However, it would be very nice if this could be fixed.

Thanks.
-- 
  Vasily Korytov
  https://chillum.github.io

← back to recent threads