* patch: completion for stgit `--patch` option
@ 2014-09-04 14:28 Alexandre Rames
2014-09-04 14:50 ` Peter Stephenson
0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Rames @ 2014-09-04 14:28 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1.1: Type: text/plain, Size: 296 bytes --]
Here is a patch adding completion support for stgit `--patch` option.
With the patch applied I get:
$ stg ser
+ bar_feature
> foo_feature
$ stg refresh --patch bar_feature
-- patch --
bar_feature foo_feature
If that is of any interest, what's the process to get this in?
Cheers,
Alexandre
[-- Attachment #1.2: Type: text/html, Size: 413 bytes --]
[-- Attachment #2: zsh_stgit_comp.patch --]
[-- Type: text/x-patch, Size: 821 bytes --]
commit 8e7f84ddda81280812a5082ff82209c30928b17e
Author: Alexandre Rames <alexandre.rames@arm.com>
Date: Thu Sep 4 15:21:39 2014 +0100
Add completion for stgit `--patch` option.
diff --git a/Completion/Unix/Command/_stgit b/Completion/Unix/Command/_stgit
index b2f2aea..6248267 100644
--- a/Completion/Unix/Command/_stgit
+++ b/Completion/Unix/Command/_stgit
@@ -32,6 +32,17 @@ else
compadd $(stg series --noprefix 2> /dev/null) \
&& ret=0
;;
+ (ref*)
+ last_word="$words[$CURRENT-1]"
+ refresh_patch_options=( -p --patch )
+ if [[ -n ${refresh_patch_options[(r)$last_word]} ]]; then
+ _wanted -V "applied patches" expl "patch" \
+ compadd ${${(M)${(f)"$(stg series 2> /dev/null)"}##[+>] *}#[+>] } \
+ && ret=0
+ else
+ _files
+ fi
+ ;;
(*)
_files
;;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: patch: completion for stgit `--patch` option
2014-09-04 14:28 patch: completion for stgit `--patch` option Alexandre Rames
@ 2014-09-04 14:50 ` Peter Stephenson
2014-09-04 19:28 ` Alexandre Rames
0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2014-09-04 14:50 UTC (permalink / raw)
To: zsh-workers
On Thu, 04 Sep 2014 15:28:11 +0100
Alexandre Rames <alexandre@uop.re> wrote:
> Here is a patch adding completion support for stgit `--patch` option.
>
> If that is of any interest, what's the process to get this in?
You wait for me to add it, which I've just done.
pws
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: patch: completion for stgit `--patch` option
2014-09-04 14:50 ` Peter Stephenson
@ 2014-09-04 19:28 ` Alexandre Rames
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Rames @ 2014-09-04 19:28 UTC (permalink / raw)
To: Peter Stephenson; +Cc: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 429 bytes --]
Well I didn't have to wait, it was too quick! Thanks.
On Thu, Sep 4, 2014 at 3:50 PM, Peter Stephenson <p.stephenson@samsung.com>
wrote:
> On Thu, 04 Sep 2014 15:28:11 +0100
> Alexandre Rames <alexandre@uop.re> wrote:
> > Here is a patch adding completion support for stgit `--patch` option.
> >
> > If that is of any interest, what's the process to get this in?
>
> You wait for me to add it, which I've just done.
>
> pws
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-04 19:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-04 14:28 patch: completion for stgit `--patch` option Alexandre Rames
2014-09-04 14:50 ` Peter Stephenson
2014-09-04 19:28 ` Alexandre Rames
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).