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

Re: Bug#501851: zsh: Completion fails if a directory name contains '(', ')' and 'Ä '.



On 10/14/2008 09:04 PM, Peter Stephenson wrote:
> Until then you should be able to get away with the old syntax,
>
> zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
>
> since before I finish the job it won't actually handle non-ASCII character
> conversions properly anyway.

Thanks for detailed explanation! But I'm still confusing. Even with the old
syntax, the completion Ä/[TAB] won't work. As far as I understand, the following
configuration should fix the completion problem, but it won't.

% cat ~/.zshrc
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall

#zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}'
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
zstyle :compinstall filename '/home/qw/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall



BTW, to find out why replacing _path_files with the old one solves the problem
for me, I put a debug output into _path_files as below to watch the value of
$tmp1 before the $~tmp1 expansion.
    print "DEBUG: LINENO=$LINENO tmp1=$tmp1" > /dev/stderr
    tmp1=( $~tmp1 ) 2> /dev/null

When I type Ä/[TAB], I got this debug output.
DEBUG: LINENO=400 tmp1=Äï*(-/)
DEBUG: LINENO=400 tmp1=Äï*(-/)

Afterward, I replaced _path_files with the old one (which is from zsh 4.3.6),
and put the same debug output, then I got this debug output.
DEBUG: LINENO=372 tmp1=Äï*(-/)
DEBUG: LINENO=372 tmp1=Ä/*

It seems that tmp1 has a invalid (meta-encoded?) character. In _path_files which
is from zsh 4.3.6, they seems to retry with a normal (non-meta-encoded?) character.

Unfortunately, I couldn't understand why they are differ....

-- 
Morita Sho <morita-pub-en-debian@xxxxxxxxxxxxxxxx>



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