From: joe M <joe9mail@gmail.com>
To: zsh-workers@zsh.org
Subject: zsh completer _approximate completer
Date: Thu, 28 Feb 2013 01:27:44 -0500 [thread overview]
Message-ID: <CAHjjW14F6x6p9y-yBY6Zu5yvNcW4RnU6NdDTcoC8AFxMJ7hGwg@mail.gmail.com> (raw)
Hello,
I notice that the _approximate completer does not respect the group
order. I want it to show the original on top of the corrections list
and specified it with:
zstyle ':completion:*:approximate:*' max-errors 1 numeric
zstyle ':completion:*:approximate:*' group-order original corrections
# '-e' is needed to get the argument evaluated each time this is called
# this argument to max-errors allows one error in 10 characters.
# And if you want the number of errors allowed by
# _approximate to increase with the length of what
# you have typed so far:
zstyle -e ':completion:*:approximate:*' \
max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3))numeric)'
----------------------------------
test sample output:
g test 01-colors.zsh
-- { g test *. } --
-- corrections (errors: 1) --
01-colors.zsh 40-completion.zsh
all_opts todo
01-prezto-helper.zsh 40-completion.zsh.original
all_opts_bang todo.txt
05-appearance.unused_zsh 40-directory.zsh
bart.theme trapd00r.theme
06-zex.zsh-does-not-work 50-bindkeys.zsh
colorize* zex-zsh/
10-syntax.zsh.trapd00r 50-functions.zsh
colorize.c zprofile.20110925
20-abbrevations.zsh 60-git.zsh
compdef/ zprofile.20120319
20-bookmarks.zsh 70-autojump.zsh
compdef.disable/ zprofile.20130124
20-exports.zsh 70-simpleprompt.zsh
.git/ zprofile.latest
20-history.zsh 90-syntax.zsh
.gitignore zprofile.root
20-setopts.zsh 90-syntax.zsh.zsh-syntax-highlighting
history_words_to_commands.patch zprofile.simple
40-alias-global.zsh 91-history-substring-search.zsh
mikachu-dot-zshrc zsh_history.joe
40-alias-suffix.zsh 92-auto-fu.zsh
prezto/ zshrc
40-alias.zsh 99-startup.zsh
start-zsh-with-cmd.exp*
-- original --
*.
Is this expected behaviour?
Thanks
Joe
next reply other threads:[~2013-02-28 6:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 6:27 joe M [this message]
2013-02-28 6:42 ` joe M
2013-02-28 9:00 ` Oliver Kiddle
2013-02-28 9:30 ` Oliver Kiddle
2013-03-01 19:30 ` joe M
2013-03-01 19:38 ` joe M
2013-03-01 20:30 ` joe M
2013-03-01 23:40 ` Oliver Kiddle
2013-03-02 4:13 ` joe M
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=CAHjjW14F6x6p9y-yBY6Zu5yvNcW4RnU6NdDTcoC8AFxMJ7hGwg@mail.gmail.com \
--to=joe9mail@gmail.com \
--cc=zsh-workers@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).