From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14215 invoked by alias); 7 Jul 2016 02:00:26 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21737 Received: (qmail 15550 invoked from network); 7 Jul 2016 02:00:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 Date: Thu, 07 Jul 2016 02:00:10 +0000 From: Daniel Shahaf To: Oliver Kiddle Cc: Jordan Klassen , zsh-users@zsh.org Subject: Re: git-subtree completions Message-ID: <20160707020010.GA25225@tarsus.local2> References: <27621.1463140958__28965.9567446963$1463141465$gmane$org@thecus.kiddle.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <27621.1463140958__28965.9567446963$1463141465$gmane$org@thecus.kiddle.eu> User-Agent: Mutt/1.5.23 (2014-03-12) I see this has been committed now; reviewing the committed patch: > +++ b/Completion/Unix/Command/_git > @@ -1747,6 +1747,91 @@ > +(( $+functions[_git-subtree] )) || > +_git-subtree () { > + (option-or-argument) > + curcontext=${curcontext%:*}-$line[1]: > + case $line[1] in > + (add) > + _arguments \ > + '(-q --quiet)'{-q,--quiet}'[suppress progress output]' \ > + '(-m --message)'{-m,--message}'[use the given message as the commit message for the merge commit]' \ -m takes an argument, but this spec doesn't reflect that. I assume it should be '(-m --message)'{-m+,--message=}'[use the given message as the commit message for the merge commit]:message' \ ^^^ ^^^^^^^^^^ ^^^^^^^^ (three changes) > + '(-P --prefix)'{-P,--prefix=}'[the path to the subtree in the repository to manipulate]: :_directories' \ s/-P,/-P+,/ > + '--squash[import only a single commit from the subproject]' \ > + ': :__git_any_repositories_or_references' \ > + ':: :__git_ref_specs' && ret=0 __git_ref_specs doesn't seem appropriate here: . % git subtree add -P foo ../other-repository/ master:target 'master:target' does not look like a ref . I think what is wanted here is "names of refs in the remote repository", same as the before-the-colon part of 'git fetch' refspecs. (And by the way, __git_ref_specs is deprecated in master; new code should use one of the two __git_ref_specs_* functions directly.) Cheers, Daniel