* [RFC] Use _multi_parts for completing git tree files
@ 2008-10-07 20:24 Jörg Sommer
2008-10-09 22:01 ` Clint Adams
0 siblings, 1 reply; 3+ messages in thread
From: Jörg Sommer @ 2008-10-07 20:24 UTC (permalink / raw)
To: zsh-workers; +Cc: Jörg Sommer
This makes it possible to use abbreviated paths for tree files like
git checkout C/U/C/_gi
for
git checkout Completion/Unix/Command/_git
---
Completion/Unix/Command/_git | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index c8a1282..c617613 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2859,7 +2859,7 @@ __git_tree_files () {
fi
local expl
- _wanted files expl 'tree file' compadd $multi_parts_opts -f -a tree_files
+ _wanted files expl 'tree file' _multi_parts -f $@ -- / tree_files
}
# TODO: deal with things that __git_heads and __git_tags has in common (i.e.,
--
1.6.0.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Use _multi_parts for completing git tree files
2008-10-07 20:24 [RFC] Use _multi_parts for completing git tree files Jörg Sommer
@ 2008-10-09 22:01 ` Clint Adams
2008-10-09 23:38 ` Jörg Sommer
0 siblings, 1 reply; 3+ messages in thread
From: Clint Adams @ 2008-10-09 22:01 UTC (permalink / raw)
To: Jörg Sommer; +Cc: zsh-workers
On Tue, Oct 07, 2008 at 10:24:03PM +0200, Jörg Sommer wrote:
> + _wanted files expl 'tree file' _multi_parts -f $@ -- / tree_files
Seems good.
Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.106
diff -u -r1.106 _git
--- Completion/Unix/Command/_git 9 Oct 2008 21:54:10 -0000 1.106
+++ Completion/Unix/Command/_git 9 Oct 2008 21:56:13 -0000
@@ -2791,9 +2791,6 @@
(( $+functions[__git_tree_files] )) ||
__git_tree_files () {
local multi_parts_opts
-
- zparseopts -D -E -a multi_parts_opts M: J: V: 1 2 n F: X:
-
local tree Path
integer at_least_one_tree_added
local -a tree_files
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Use _multi_parts for completing git tree files
2008-10-09 22:01 ` Clint Adams
@ 2008-10-09 23:38 ` Jörg Sommer
0 siblings, 0 replies; 3+ messages in thread
From: Jörg Sommer @ 2008-10-09 23:38 UTC (permalink / raw)
To: zsh-workers
Hallo Clint,
Clint Adams <clint@zsh.org> wrote:
> On Tue, Oct 07, 2008 at 10:24:03PM +0200, Jörg Sommer wrote:
>> + _wanted files expl 'tree file' _multi_parts -f $@ -- / tree_files
>
> Seems good.
Thanks for picking it up.
> Index: Completion/Unix/Command/_git
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
> retrieving revision 1.106
> diff -u -r1.106 _git
> --- Completion/Unix/Command/_git 9 Oct 2008 21:54:10 -0000 1.106
> +++ Completion/Unix/Command/_git 9 Oct 2008 21:56:13 -0000
> @@ -2791,9 +2791,6 @@
> (( $+functions[__git_tree_files] )) ||
> __git_tree_files () {
> local multi_parts_opts
> -
> - zparseopts -D -E -a multi_parts_opts M: J: V: 1 2 n F: X:
> -
Then you can remove the local line before, too.
Bye, Jörg.
--
Macht besitzen und nicht ausüben ist wahre Größe.
(Friedl Beutelrock)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-09 23:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-07 20:24 [RFC] Use _multi_parts for completing git tree files Jörg Sommer
2008-10-09 22:01 ` Clint Adams
2008-10-09 23:38 ` Jörg Sommer
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).