Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH 2/5] _hg: declare appropriate local parameters for ->string form
- X-seq: zsh-workers 43243
- From: Anton Shestakov <av6@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx, Peter Stephenson <p.stephenson@xxxxxxxxxxx>, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH 2/5] _hg: declare appropriate local parameters for ->string form
- Date: Mon, 6 Aug 2018 19:09:14 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dwimlabs.net; s=20171204; t=1533553758; bh=H6YLTmU/2b8I5QgQw4PVOWdAKWmbDaFSMY0LG/XtS9g=; h=Date:From:To:Subject:In-Reply-To:References:From; b=V8Hbwmt/3XJQiAwstbflwe72Ct/zl+U+TtMFzKEkyyv+lqDb6ihwh27sw1i0tAa9i IdxfgkwgQbdjWqcGzSyKRDdZDbTbchfgK7IHnyBVg9z3mxwj/NMbXTWWOX71F7zaUw iq2Vtk3AUKzwHs/SlpNtHDJHQOC7Ut4H/O6HfIVU=
- In-reply-to: <20180806092931eucas1p1c89ebf9f2ee4f5bb40ac2c650cf4a6f2~IQZLFzTOa0396203962eucas1p1k@eucas1p1.samsung.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20180806072813.5051-1-av6@dwimlabs.net> <20180806072813.5051-3-av6@dwimlabs.net> <CGME20180806092113epcas2p1be3488679902085a99d66331745e15d4@epcas2p1.samsung.com> <20180806092032.uizmxvlc2oku2ik6@tarpaulin.shahaf.local2> <20180806092931eucas1p1c89ebf9f2ee4f5bb40ac2c650cf4a6f2~IQZLFzTOa0396203962eucas1p1k@eucas1p1.samsung.com>
Okay, does this look better? (focusing only on _hg_cmd_resolve for now)
diff --git a/Completion/Unix/Command/_hg b/Completion/Unix/Command/_hg
index 50ab7132c..0951ef53a 100644
--- a/Completion/Unix/Command/_hg
+++ b/Completion/Unix/Command/_hg
@@ -698,20 +698,22 @@ _hg_cmd_rename() {
}
_hg_cmd_resolve() {
- local context state line
+ local context state state_descr line ret=1
typeset -A opt_args
_arguments -s : $_hg_global_opts \
'(--list -l --mark -m --unmark -u)'{-l,--list}'[list state of files needing merge]:*:merged files:->resolve_files' \
'(--mark -m --list -l --unmark -u)'{-m,--mark}'[mark files as resolved]:*:unresolved files:_hg_unresolved' \
'(--unmark -u --list -l --mark -m)'{-u,--unmark}'[unmark files as resolved]:*:resolved files:_hg_resolved' \
- '*:file:_hg_unresolved'
+ '*:file:_hg_unresolved' && ret=0
if [[ $state == 'resolve_files' ]]
then
_alternative 'files:resolved files:_hg_resolved' \
- 'files:unresolved files:_hg_unresolved'
+ 'files:unresolved files:_hg_unresolved' && ret=0
fi
+
+ return ret
}
_hg_cmd_revert() {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author