git/list[1] front-page[2] threads[3] people[4] search[5] about
 

zsh completion does not support branches with quotes/apostrophes

From
VKVasily Korytov <vasily.korytov@icloud.com>
Date
Sep 10, 2018, 15:02 UTC
Message-ID
<E2F53114-B4F9-4787-8017-60C976C8E03C@icloud.com>
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
Message 1 of 1 in “zsh completion does not support branches with quotes/apostrophes”
  1. Vasily KorytovSep 10, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.