mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 10:01:11 +02:00
Frank: 27702: git notes completion
This commit is contained in:
parent
c7869fad84
commit
efaf292480
2 changed files with 38 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
2010-02-13 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* Frank: 27702: Completion/Unix/Command/_git: notes
|
||||
|
||||
2010-02-12 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* unposted: Completion/Zsh/Type/_globquals: add P to list.
|
||||
|
@ -12726,5 +12730,5 @@
|
|||
|
||||
*****************************************************
|
||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||
* $Revision: 1.4893 $
|
||||
* $Revision: 1.4894 $
|
||||
*****************************************************
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#compdef git git-add git-am git-annotate git-apply git-applymbox git-applypatch git-archimport git-archive git-bisect git-blame git-branch git-cat-file git-check-attr git-check-ref-format git-checkout git-checkout-index git-cherry git-cherry-pick git-clean git-clone git-clone-pack git-commit git-commit-tree git-convert-objects git-count-objects git-cvsexportcommit git-cvsimport git-cvsserver git-daemon git-describe git-diff git-diff-files git-diff-index git-diff-stages git-diff-tree git-fast-import git-fetch git-fetch-pack git-fmt-merge-msg git-for-each-ref git-format-patch git-fsck git-gc git-get-tar-commit-id git-grep git-hash-object git-http-fetch git-http-push git-imap-send git-index-pack git-init git-instaweb git-local-fetch git-log git-lost-found git-ls-files git-ls-remote git-ls-tree git-mailinfo git-mailsplit git-merge git-merge-base git-merge-file git-merge-index git-merge-one-file git-merge-tree git-mergetool git-mktag git-mktree git-mv git-name-rev git-pack-objects git-pack-redundant git-pack-refs git-patch-id git-peek-remote git-prune git-prune-packed git-pull git-push git-quiltimport git-read-tree git-rebase git-receive-pack git-reflog git-relink git-remote git-repack gut-runstatus git-config git-request-pull git-rerere git-reset git-rev-list git-rev-parse git-revert git-rm git-send-email git-send-pack git-sh-setup git-shell git-shortlog git-show git-show-branch git-show-index git-show-ref git-ssh-fetch git-ssh-upload git-status git-stripspace git-svn git-svnimport git-symbolic-ref git-tag git-tar-tree git-unpack-file git-unpack-objects git-update-index git-update-ref git-update-server-info git-upload-archive git-upload-pack git-var git-verify-pack git-verify-tag git-whatchanged git-write-tree
|
||||
#compdef git git-add git-am git-annotate git-apply git-applymbox git-applypatch git-archimport git-archive git-bisect git-blame git-branch git-cat-file git-check-attr git-check-ref-format git-checkout git-checkout-index git-cherry git-cherry-pick git-clean git-clone git-clone-pack git-commit git-commit-tree git-convert-objects git-count-objects git-cvsexportcommit git-cvsimport git-cvsserver git-daemon git-describe git-diff git-diff-files git-diff-index git-diff-stages git-diff-tree git-fast-import git-fetch git-fetch-pack git-fmt-merge-msg git-for-each-ref git-format-patch git-fsck git-gc git-get-tar-commit-id git-grep git-hash-object git-http-fetch git-http-push git-imap-send git-index-pack git-init git-instaweb git-local-fetch git-log git-lost-found git-ls-files git-ls-remote git-ls-tree git-mailinfo git-mailsplit git-merge git-merge-base git-merge-file git-merge-index git-merge-one-file git-merge-tree git-mergetool git-mktag git-mktree git-mv git-name-rev git-notes git-pack-objects git-pack-redundant git-pack-refs git-patch-id git-peek-remote git-prune git-prune-packed git-pull git-push git-quiltimport git-read-tree git-rebase git-receive-pack git-reflog git-relink git-remote git-repack gut-runstatus git-config git-request-pull git-rerere git-reset git-rev-list git-rev-parse git-revert git-rm git-send-email git-send-pack git-sh-setup git-shell git-shortlog git-show git-show-branch git-show-index git-show-ref git-ssh-fetch git-ssh-upload git-status git-stripspace git-svn git-svnimport git-symbolic-ref git-tag git-tar-tree git-unpack-file git-unpack-objects git-update-index git-update-ref git-update-server-info git-upload-archive git-upload-pack git-var git-verify-pack git-verify-tag git-whatchanged git-write-tree
|
||||
|
||||
# TODO: All if (( words[(I)-option] )) should be turned into
|
||||
# if (( words[(I)-option] > 0 && words[(I)-option] < CURRENT )), as the user
|
||||
|
@ -225,6 +225,7 @@ _git_commands () {
|
|||
'mktag:create tag object'
|
||||
'mktree:build tree-object from ls-tree formatted text'
|
||||
'name-rev:find symbolic names for given revisions'
|
||||
'notes:add/inspect commit notes'
|
||||
'pack-objects:create packed archive of objects'
|
||||
'pack-redundant:find redundant pack files'
|
||||
'pack-refs:pack heads and tags for efficient repository access'
|
||||
|
@ -998,6 +999,37 @@ _git-name-rev () {
|
|||
'(--stdin --all)*:commit-ish:__git_revisions' && ret=0
|
||||
}
|
||||
|
||||
(( $+functions[_git-notes] )) ||
|
||||
_git-notes () {
|
||||
local expl
|
||||
local -a notes_cmds
|
||||
|
||||
notes_cmds=(
|
||||
edit:"edit note"
|
||||
show:"shot commit note"
|
||||
)
|
||||
|
||||
if (( CURRENT == 2 )); then
|
||||
_describe -t command "git-notes commands" notes_cmds && ret=0
|
||||
else
|
||||
case $words[2] in
|
||||
(show)
|
||||
_arguments \
|
||||
'*:commit id:__git_commits' && ret=0
|
||||
;;
|
||||
(edit)
|
||||
_arguments \
|
||||
'-F[use file'\''s contents as the commit note]:file:_path_files' \
|
||||
'-m[use the given message as the commit note]:message' \
|
||||
'*:commit id:__git_commits' && ret=0
|
||||
;;
|
||||
(*)
|
||||
_nothing
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
(( $+functions[_git-pack-redundant] )) ||
|
||||
_git-pack-redundant () {
|
||||
_arguments \
|
||||
|
|
Loading…
Reference in a new issue