zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Case-insensitive completion with partial substring matching
Date: Sat, 07 Jun 2014 10:54:45 -0700	[thread overview]
Message-ID: <140607105445.ZM24783@torch.brasslantern.com> (raw)
In-Reply-To: <33086926-C7D7-4D33-AF86-4B0D48977555@laposte.net>

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".


  reply	other threads:[~2014-06-07 17:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-07 15:12 nicolas.canceill
2014-06-07 17:54 ` Bart Schaefer [this message]
2014-06-07 18:00   ` nicolas.canceill
2014-06-07 19:30     ` Bart Schaefer
2014-06-07 20:39       ` nicolas.canceill
2014-06-07 21:02         ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=140607105445.ZM24783@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).