Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: _path_files returning an error




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