* PATCH: _git: Offer git-foo commands from $PATH
@ 2011-06-27 22:13 Frank Terbeck
2011-07-12 14:19 ` Nikolai Weibull
0 siblings, 1 reply; 2+ messages in thread
From: Frank Terbeck @ 2011-06-27 22:13 UTC (permalink / raw)
To: zsh workers; +Cc: Nikolai Weibull
This helps supporting third-party add-ons. This could be made smarter,
like filtering out git-foo commands where `foo' is already in another
sub-command group. Like `git cvsserver' which is already in "interaction
commands".
This could also be made optional via a boolean style... I don't know.
What about others? Nikolai?
---
Completion/Unix/Command/_git | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 2b8b8d6..12790a7 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -4591,6 +4591,9 @@ _git_commands () {
patch-id:'compute unique ID for a patch'
stripspace:'filter out empty lines')
+ local -a git_commands_from_path
+ git_commands_from_path=( ${${commands[(I)git-*]}#git-} )
+
integer ret=1
# TODO: Is this the correct way of doing it?
# TODO: Should we be chaining them together with || instead?
@@ -4603,6 +4606,7 @@ _git_commands () {
_describe -t plumbing-sync-commands 'plumbing sync command' plumbing_sync_commands && ret=0
_describe -t plumbing-sync-helper-commands 'plumbing sync helper command' plumbing_sync_helper_commands && ret=0
_describe -t plumbing-internal-helper-commands 'plumbing internal helper command' plumbing_internal_helper_commands && ret=0
+ _describe -t sub-commands-from-path 'sub commands from path' git_commands_from_path && ret=0
return ret
}
--
1.7.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: _git: Offer git-foo commands from $PATH
2011-06-27 22:13 PATCH: _git: Offer git-foo commands from $PATH Frank Terbeck
@ 2011-07-12 14:19 ` Nikolai Weibull
0 siblings, 0 replies; 2+ messages in thread
From: Nikolai Weibull @ 2011-07-12 14:19 UTC (permalink / raw)
To: Frank Terbeck; +Cc: zsh workers
On Tue, Jun 28, 2011 at 00:13, Frank Terbeck <ft@bewatermyfriend.org> wrote:
> This helps supporting third-party add-ons. This could be made smarter,
> like filtering out git-foo commands where `foo' is already in another
> sub-command group. Like `git cvsserver' which is already in "interaction
> commands".
>
> This could also be made optional via a boolean style... I don't know.
> What about others? Nikolai?
I haven’t forgotten about this. I returned from vacation a couple of
days ago and haven’t had time to look at this yet.
I feel, though, that the _git-X completion files should be able to set
a zstyle with the description of the command instead of forcing _git
to look for a #desc: line.
I’ll look into this further as soon as possible.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-12 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-27 22:13 PATCH: _git: Offer git-foo commands from $PATH Frank Terbeck
2011-07-12 14:19 ` Nikolai Weibull
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).