{"thread":{"id":"3672","subject":"[PATCH] Basic Zsh completion support","startedAt":"2006-03-18T14:53:47Z","lastAt":"2006-03-18T16:23:39Z","messageCount":5,"participants":["Fredrik Kuivinen","Nikolai Weibull","Bertrand Jacquin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"17649","messageId":"20060318145347.15128.85902.stgit@c165","threadId":"3672","inReplyTo":null,"subject":"[PATCH] Basic Zsh completion support","fromName":"Fredrik Kuivinen","fromEmail":"freku045@student.liu.se","sentAt":"2006-03-18T14:53:47Z","receivedAt":"2006-03-18T14:53:47Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"\nBased on the completion code for quilt in the Zsh distribution.\n\nSigned-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n .gitignore            |    1 +\n Makefile              |    8 +++++++-\n generate-zsh-compl.sh |   26 ++++++++++++++++++++++++++\n 3 files changed, 34 insertions(+), 1 deletions(-)\n\ndiff --git a/.gitignore b/.gitignore\nindex b4355b9..1cf6ac0 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -133,3 +133,4 @@ libgit.a\n *.py[co]\n config.mak\n git-blame\n+_git\ndiff --git a/Makefile b/Makefile\nindex 8a20c76..85c5e2d 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -96,6 +96,7 @@ bindir = $(prefix)/bin\n gitexecdir = $(bindir)\n template_dir = $(prefix)/share/git-core/templates/\n GIT_PYTHON_DIR = $(prefix)/share/git-core/python\n+ZSH_COMPL_DIR = $(prefix)/share/zsh/site-functions\n # DESTDIR=\n \n CC = gcc\n@@ -438,13 +439,14 @@ SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_P\n PERL_PATH_SQ = $(subst ','\\'',$(PERL_PATH))\n PYTHON_PATH_SQ = $(subst ','\\'',$(PYTHON_PATH))\n GIT_PYTHON_DIR_SQ = $(subst ','\\'',$(GIT_PYTHON_DIR))\n+ZSH_COMPL_DIR_SQ = $(subst ','\\'',$(ZSH_COMPL_DIR))\n \n ALL_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' $(COMPAT_CFLAGS)\n LIB_OBJS += $(COMPAT_OBJS)\n export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir\n ### Build rules\n \n-all: $(ALL_PROGRAMS) git$X gitk\n+all: $(ALL_PROGRAMS) git$X gitk _git\n \n all:\n \t$(MAKE) -C templates\n@@ -553,6 +555,8 @@ $(LIB_FILE): $(LIB_OBJS)\n doc:\n \t$(MAKE) -C Documentation all\n \n+_git: generate-zsh-compl.sh\n+\t./generate-zsh-compl.sh version help $(ALL_PROGRAMS) > _git\n \n ### Testing rules\n \n@@ -586,6 +590,8 @@ install: all\n \t$(MAKE) -C templates install\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'\n \t$(INSTALL) $(PYMODULES) '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'\n+\t$(INSTALL) -d -m755 $(ZSH_COMPL_DIR)\n+\t$(INSTALL) -m644 _git '$(DESTDIR_SQ)$(ZSH_COMPL_DIR_SQ)'\n \n install-doc:\n \t$(MAKE) -C Documentation install\ndiff --git a/generate-zsh-compl.sh b/generate-zsh-compl.sh\nnew file mode 100755\nindex 0000000..f8c80de\n--- /dev/null\n+++ b/generate-zsh-compl.sh\n@@ -0,0 +1,26 @@\n+#!/bin/sh\n+\n+cmds=$(echo \"$@\" | sed s/git-//g | sed \"s/\\\\.[^ ]*//g\")\n+\n+cat <<EOF\n+#compdef git\n+\n+# Automatically generated by $0\n+\n+local _git_subcommands expl curcontext=\"$curcontext\"\n+\n+_arguments \\\n+  '--version' \\\n+  '--exec-path=:Git exec path:_path_files' \\\n+  '--help' \\\n+  '*::git command:->subcmd' && return 0\n+\n+ _git_subcommands=($cmds)\n+\n+if (( CURRENT == 1 )); then\n+  _describe -t subcommand 'subcommand' _git_subcommands\n+else\n+  # this part should be tailored for subcmds\n+  _files\n+fi\n+EOF\n"},{"id":"17650","messageId":"dbfc82860603180725w2eb3057ey17fa8d9dc746127@mail.gmail.com","threadId":"3672","inReplyTo":"20060318145347.15128.85902.stgit@c165","subject":"Re: [PATCH] Basic Zsh completion support","fromName":"Nikolai Weibull","fromEmail":"now@bitwi.se","sentAt":"2006-03-18T15:25:04Z","receivedAt":"2006-03-18T15:25:04Z","isPatch":true,"sender":{"key":"now@bitwi.se","avatar":"https://gravatar.com/avatar/d9242f067845cf9a72be23e4213c3b6e53492178e5df97372088a441af846133?d=mp&s=160"},"body":"On 3/18/06, Fredrik Kuivinen <freku045@student.liu.se> wrote:\n>\n> Based on the completion code for quilt in the Zsh distribution.\n\nActually, there's an almost-complete implementation in 4.3 already. \nWritten by me nonetheless.  You can take a look and make suggestions\nif you like :-).  I have an updated version to deal with post\n1.0-changes locally that I'm going to put in Zsh's CVS soon enough.\n\n  nikolai\n"},{"id":"17651","messageId":"4fb292fa0603180752r731c628eoa2b96fcd6ef43e0f@mail.gmail.com","threadId":"3672","inReplyTo":"dbfc82860603180725w2eb3057ey17fa8d9dc746127@mail.gmail.com","subject":"Re: [PATCH] Basic Zsh completion support","fromName":"Bertrand Jacquin","fromEmail":"beber.mailing@gmail.com","sentAt":"2006-03-18T15:52:15Z","receivedAt":"2006-03-18T15:52:15Z","isPatch":true,"sender":{"key":"beber.mailing@gmail.com","avatar":null},"body":"On 3/18/06, Nikolai Weibull <now@bitwi.se> wrote:\n> On 3/18/06, Fredrik Kuivinen <freku045@student.liu.se> wrote:\n> >\n> > Based on the completion code for quilt in the Zsh distribution.\n>\n> Actually, there's an almost-complete implementation in 4.3 already.\n> Written by me nonetheless.  You can take a look and make suggestions\n> if you like :-).  I have an updated version to deal with post\n> 1.0-changes locally that I'm going to put in Zsh's CVS soon enough.\n\nAny plan do to this for cogito ?\n\n>\n>   nikolai\n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n\n\n--\nBeber\n#e.fr@freenode\n"},{"id":"17652","messageId":"dbfc82860603180814p36a5bf3eo4771610981870bca@mail.gmail.com","threadId":"3672","inReplyTo":"4fb292fa0603180752r731c628eoa2b96fcd6ef43e0f@mail.gmail.com","subject":"Re: [PATCH] Basic Zsh completion support","fromName":"Nikolai Weibull","fromEmail":"now@bitwi.se","sentAt":"2006-03-18T16:14:31Z","receivedAt":"2006-03-18T16:14:31Z","isPatch":true,"sender":{"key":"now@bitwi.se","avatar":"https://gravatar.com/avatar/d9242f067845cf9a72be23e4213c3b6e53492178e5df97372088a441af846133?d=mp&s=160"},"body":"On 3/18/06, Bertrand Jacquin <beber.mailing@gmail.com> wrote:\n> On 3/18/06, Nikolai Weibull <now@bitwi.se> wrote:\n> > On 3/18/06, Fredrik Kuivinen <freku045@student.liu.se> wrote:\n> > >\n> > > Based on the completion code for quilt in the Zsh distribution.\n> >\n> > Actually, there's an almost-complete implementation in 4.3 already.\n> > Written by me nonetheless.  You can take a look and make suggestions\n> > if you like :-).  I have an updated version to deal with post\n> > 1.0-changes locally that I'm going to put in Zsh's CVS soon enough.\n>\n> Any plan do to this for cogito ?\n\nSure, and stgit as well, but I haven't gotten around to it.  The idea\nwas to reuse as much as possible of the stuff that the three have in\ncommon (like tags, references, and so on), but as I haven't used\neither of the two (cogito and stgit) I haven't had a compelling reason\nto sit down and do it.\n\n  nikolai\n"},{"id":"17653","messageId":"20060318162339.GA4470@c165.ib.student.liu.se","threadId":"3672","inReplyTo":"dbfc82860603180725w2eb3057ey17fa8d9dc746127@mail.gmail.com","subject":"Re: [PATCH] Basic Zsh completion support","fromName":"Fredrik Kuivinen","fromEmail":"freku045@student.liu.se","sentAt":"2006-03-18T16:23:39Z","receivedAt":"2006-03-18T16:23:39Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"On Sat, Mar 18, 2006 at 04:25:04PM +0100, Nikolai Weibull wrote:\n> On 3/18/06, Fredrik Kuivinen <freku045@student.liu.se> wrote:\n> >\n> > Based on the completion code for quilt in the Zsh distribution.\n> \n> Actually, there's an almost-complete implementation in 4.3 already. \n> Written by me nonetheless.  You can take a look and make suggestions\n> if you like :-).  I have an updated version to deal with post\n> 1.0-changes locally that I'm going to put in Zsh's CVS soon enough.\n> \n\nOh, I didn't know about that.\n\n<updates zsh>\n\nVery nice! Much better than my crude cut-and-paste work.\n\n\nJunio: Please don't apply the patch.\n\n- Fredrik\n"}]}