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

Re: Case-insensitive completion with partial substring matching



On Jun 7,  5:12pm, nicolas.canceill wrote:
}
} zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
} 
} Under the above conditions, the "bug" occurs when completing after a
} substring prefixing the common suffix (i.e. completing after "a" or
} "ab" or "abc", when the common suffix is "abc") will insert a letter
} before the suffix. This letter will be the n-th character of the
} suffix, in inverted case.
}
} Example: in a directory containing two files "1abc" and "2abc",
} completing after "less a" will expand it to "abc" and then add an
} extra "A", so the command line will look like "less Aabc".

This is definitely a bug, and although I don't understand why it is
happening, it appears to have to do with characters that are left out
of the m: range in the matcher list.  E.g. if you change to:

zstyle ':completion:*' matcher-list \
	'm:{a-zA-Z0-9}={A-Za-z0-9}' \
	'r:|[._-]=* r:|=*' 'l:|=* r:|=*'

then the problem with digits goes away, but you can still reproduce the
bug for files with names like "_abc" and "%abc".



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