From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2450 invoked by alias); 7 Jun 2014 18:00:25 -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: 18877 Received: (qmail 8180 invoked from network); 7 Jun 2014 18:00:23 -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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: Case-insensitive completion with partial substring matching From: "nicolas.canceill" In-Reply-To: <140607105445.ZM24783@torch.brasslantern.com> Date: Sat, 7 Jun 2014 20:00:15 +0200 Cc: zsh-users@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <33086926-C7D7-4D33-AF86-4B0D48977555@laposte.net> <140607105445.ZM24783@torch.brasslantern.com> To: Bart Schaefer X-Mailer: Apple Mail (2.1878.2) Hi Bart, and thanks for replying. Are you saying I should file a bug with Zsh about that? If you think I = can assist in debugging, maybe you could help me find the relevant = portions of the Zsh code? Cheers. Nicolas Canceill Le 7 juin 2014 =E0 19:54, Bart Schaefer a = =E9crit : > On Jun 7, 5:12pm, nicolas.canceill wrote: > } > } zstyle ':completion:*' matcher-list 'm:{a-zA-Z}=3D{A-Za-z}' = 'r:|[._-]=3D* r:|=3D*' 'l:|=3D* r:|=3D*' > }=20 > } 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". >=20 > 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: >=20 > zstyle ':completion:*' matcher-list \ > 'm:{a-zA-Z0-9}=3D{A-Za-z0-9}' \ > 'r:|[._-]=3D* r:|=3D*' 'l:|=3D* r:|=3D*' >=20 > then the problem with digits goes away, but you can still reproduce = the > bug for files with names like "_abc" and "%abc".