From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4781 invoked by alias); 7 Jun 2014 17:55:33 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18876 Received: (qmail 18214 invoked from network); 7 Jun 2014 17:55:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140607105445.ZM24783@torch.brasslantern.com> Date: Sat, 07 Jun 2014 10:54:45 -0700 In-reply-to: <33086926-C7D7-4D33-AF86-4B0D48977555@laposte.net> Comments: In reply to "nicolas.canceill" "Case-insensitive completion with partial substring matching" (Jun 7, 5:12pm) References: <33086926-C7D7-4D33-AF86-4B0D48977555@laposte.net> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Case-insensitive completion with partial substring matching MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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".