Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: auto-completion with exact match
- X-seq: zsh-users 13477
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "Kazuo Teramoto" <kaz.rag@xxxxxxxxx>
- Subject: Re: auto-completion with exact match
- Date: Sun, 23 Nov 2008 10:15:22 -0800
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <5992e17f0811230424vb7dc2ccle366e37152b48800@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <1227383717.16125.16.camel@zoe> <081122123957.ZM32606@xxxxxxxxxxxxxxxxxxxxxx> <1227386675.16125.18.camel@zoe> <5992e17f0811221553xbc4392boa71ca9fc30d052ce@xxxxxxxxxxxxxx> <081122205238.ZM559@xxxxxxxxxxxxxxxxxxxxxx> <5992e17f0811230424vb7dc2ccle366e37152b48800@xxxxxxxxxxxxxx>
On Nov 23, 10:24am, Kazuo Teramoto wrote:
}
} > % ln <ctrl-x>h
} Produce a list of options to complete like ls. With and without a
} start arg (e.g. with 'ln win' I get a list 'wine winet' and can cycle
} between the options)
No, you misunderstand. I mean really do type a control-x and an h.
You should see something like this:
% ln
tags in context :completion::complete:ln::
globbed-files (_files _default (eval))
% rm
tags in context :completion::complete:rm::
argument-rest options (_arguments _rm (eval))
I just realized that when I looked at this before, I was using an
older version of zsh. There now is a completion function _rm, and
I'm able to reproduce the behavior you described. This function
was introduced at the beginning of October of this year.
The fix seems to be to change the direct call to _path_files in _rm
to instead call _files and let it manage looping on _path_files.
--- ../zsh-forge/current/Completion/Unix/Command/_rm 2008-10-08
04:37:34.000000000 -0700
+++ Completion/Unix/Command/_rm 2008-11-23 10:03:34.000000000 -0800
@@ -34,7 +34,7 @@
(file)
declare -a ignored
ignored=(${line//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
- _path_files -F ignored && ret=0
+ _files -F ignored && ret=0
;;
esac
Messages sorted by:
Reverse Date,
Date,
Thread,
Author