[PATCH] zsh_completion: complete all files for `commit/backout --logfile`

Nikolaj Sjujskij sterkrig at myopera.com
Wed Apr 17 12:29:02 CDT 2013


# HG changeset patch
# User Nikolaj Sjujskij <sterkrig at myopera.com>
# Date 1366218408 -14400
#      Wed Apr 17 21:06:48 2013 +0400
# Node ID f4f80e3f666d75b95f8def35ec8398aafa55ed2b
# Parent  12acbea17625a1441503418f7f2f49aa3825cf2f
zsh_completion: complete all files for `commit/backout --logfile`

Up until now commit/backout `--logfile` option was completed only with
*.txt-files. This requirement is a bit too strong (and is nowhere to be stated)
so it's better to complete with all files.

Stolen from zsh.git repo, c5fce37b changeset by Oliver Kiddle.

diff --git a/contrib/zsh_completion b/contrib/zsh_completion
--- a/contrib/zsh_completion
+++ b/contrib/zsh_completion
@@ -497,7 +497,7 @@
     '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
     '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \
     '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
-    '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt'
+    '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files'
 }
 
 _hg_cmd_bisect() {
@@ -565,7 +565,7 @@
   _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
   '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
   '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
-  '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt' \
+  '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files' \
   '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
   '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
   '--amend[amend the parent of the working dir]' \


More information about the Mercurial-devel mailing list