Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _path_files returning an error
- X-seq: zsh-users 12531
- From: "William Scott" <wgscott@xxxxxxxxxxxxxxxxxx>
- To: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- Subject: Re: _path_files returning an error
- Date: Fri, 8 Feb 2008 22:38:27 -0800 (PST)
- Cc: zsh-users@xxxxxxxxxx
- Importance: Normal
- In-reply-to: <237967ef0802082219ra9af66bpe4ee102006b9dac8@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <8A6A24D2-E920-432C-BB08-5076E8C8B375@xxxxxxxxxxxxxxxxxx> <237967ef0802082219ra9af66bpe4ee102006b9dac8@xxxxxxxxxxxxxx>
Mikael Magnusson wrote:
> On 09/02/2008, William Scott <wgscott@xxxxxxxxxxxxxxxxxx> wrote:
>> Hi folks:
>>
>> The _open completion function distributed with zsh for Darwin (mac os
>> x) uses _path_files:
>>
>> i.e.,
>>
>> _open_absolute_application_path() {
>> local expl curcontext
>> zstyle -T ":completion:${curcontext}:files" prefix-needed && \
>> [[ "$PREFIX" != [/~]* && compstate[nmatches] -ne 0 ]] && return 1
>> _wanted files expl 'application file' _path_files -P "$PREFIX[1]" -
>> W /
>> }
>>
>>
>> It returns this error, new to 4.3.5:
>>
>> zsh-% open -a TextMate <tab>
>> _path_files:compfiles:357: too few arguments
>>
>> It then offers to complete with directories but not file names.
>>
>> Line 357 is this:
>>
>> compfiles -p$cfopt tmp1 accex "$skipped" "$_matcher $matcher[2]"
>> '' fake "$pats[@]"
>
> I don't know how it happened or why, when I tried on linux it I got
> % open -a error: "kern.argmax" is an unknown key
> zargs: value for max-chars must be >= 1
>
> but I can't reproduce it.
>
> --
> Mikael Magnusson
>
On Ubuntu linux at least, open is symbolically linked to openvt, which is
a different program, so the _open completion function probably shouldn't
load unless it is Darwin.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author