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

Re: odd completion behavior



Clint Adams wrote:

> pws-4:
> 
> zsh 5 % a2ps --pretty-print=  
> _main_complete: bad pattern: (\M-T^Q^HPs^T@^P [92]
> zsh 5 % a2ps --pretty-print=
> _main_complete: bad pattern: (\n1^HPs^T@^P [92]
> zsh 5 % a2ps --pretty-print=
> _main_complete: bad set of key/value pairs for associative array [92]
> zsh 5 % 
> 
> These were achieved by typing a2ps --pre<TAB to complete until the =>
> then between 3 to 40 TABs until the error occurred.
> 
> Anyone know what's going on here?

No and I can't reproduce it. Can you get this error with `zsh -f' or
could you tell us more about your environment?

The error message irritates me because line 92 in `_main_complete' is
just `_lastcomp=( "${(@kv)compstate}" )' and the error message is only 
emitted if the number of elements in the `(...)' is odd (err, an odd
number of...). And `${(kv)foo}' should never give an odd number of
strings for an associative array, I think.

And what's that `bad pattern' message, there is no pattern. Hm.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author