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

[PATCH try3] completion: use more proper emulation for zsh

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Nov 11, 2012, 13:51 UTC
Message-ID
<1352641884-27444-1-git-send-email-felipe.contreras@gmail.com>

It turns out there's no 'bash' emulation in zsh. Anything that starts with a 'b' is mapped to the 'sh' emulation, presumably because of _b_ourne shell.

kzh emulation seems closer to bash, and at least I haven't had problems with this.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
This is the third time I send this patch.
 contrib/completion/git-completion.bash | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index be800e0..d7439a5 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2432,8 +2432,7 @@ __gitk_main ()
 __git_func_wrap ()
 {
 	if [[ -n ${ZSH_VERSION-} ]]; then
-		emulate -L bash
-		setopt KSH_TYPESET
+		emulate -L ksh
 
 		# workaround zsh's bug that leaves 'words' as a special
 		# variable in versions < 4.3.12
-- 
1.8.0
Message 1 of 1 in “completion: use more proper emulation for zsh”
  1. completion: use more proper emulation for zshFelipe Contreras, Nov 11, 2012

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.