Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _hg completion: show committable files for commit
- X-seq: zsh-workers 32698
- From: Andrew Magee <amagee@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _hg completion: show committable files for commit
- Date: Wed, 4 Jun 2014 17:03:41 +1000
- Cc: Andrew Magee <amagee@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Q83BMp6vixlXpi4PKTjSpcuCYRWTV5r9TtsM9R77NqI=; b=UHiualTG+utA7VIkypiyq5taSWaFF4EzOUN3JrepymZkpaU/MQ2w2OfddWlWF2Mk3S DwdeBWlmBxdNDLM2WSwf8UUytkZL8F1xk6VUXHh/nhChy2vsDPB02CJTEp1JPHG2DTVn LzyWpTPmuh1xgEm+/0r8m6iUrb8UNfewLZXJD1S/LCg+FSy0OiQuM8t9Ux/+DYacAFWM qycPrMT7rncTdFjWZy7Mi1FNohQX8aEC99KyVJl5hoEOnXZmDb5klPAh/Oco/bACSFuB Wl0ex8sosBrshxkW+xD4WWWiOn/IUbDLdsg7uHU6zJy7cfHMfrTxAvuy7G1iwFMfL/Ku MxBg==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
---
Completion/Unix/Command/_hg | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_hg b/Completion/Unix/Command/_hg
index f485982..c18500b 100644
--- a/Completion/Unix/Command/_hg
+++ b/Completion/Unix/Command/_hg
@@ -226,6 +226,16 @@ _hg_modified() {
_wanted files expl 'modified files' _multi_parts / status_files
}
+_hg_committable() {
+ typeset -a status_files
+ # A file is a candidate for `hg commit` if it is:
+ # - modified (m), or
+ # - added (a), or
+ # - removed (r)
+ _hg_status mar
+ _wanted files expl 'committable files' _multi_parts / status_files
+}
+
_hg_resolve() {
local rstate rpath
@@ -476,7 +486,7 @@ _hg_cmd_commit() {
'(--logfile -l)'{-l+,--logfile}'[read commit message from specified file]:log file:_files' \
'(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
'(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
- '*:file:_hg_files'
+ '*:file:_hg_committable'
}
_hg_cmd_copy() {
--
1.8.3.2
Messages sorted by:
Reverse Date,
Date,
Thread,
Author