Patchwork zsh_completion: complete all files for `commit/backout --logfile`

login
register
mail settings
Submitter Nikolaj Sjujskij
Date April 17, 2013, 5:29 p.m.
Message ID <f4f80e3f666d75b95f8d.1366219742@GentooBook.trollsnaetverk>
Download mbox | patch
Permalink /patch/1403/
State Accepted
Commit b5ca14163742e163b17cb41c67b70e5786ce5c3f
Headers show

Comments

Nikolaj Sjujskij - April 17, 2013, 5:29 p.m.
# HG changeset patch
# User Nikolaj Sjujskij <sterkrig@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.
Brendan Cully - April 17, 2013, 6:39 p.m.
On Wednesday, 17 April 2013 at 21:29, Nikolaj Sjujskij wrote:
> # HG changeset patch
> # User Nikolaj Sjujskij <sterkrig@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.

Crewed, thanks.

Patch

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]' \