Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh completer _approximate completer
- X-seq: zsh-workers 31080
- From: joe M <joe9mail@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: zsh completer _approximate completer
- Date: Thu, 28 Feb 2013 01:27:44 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=KXv+Sxah2S4rLgIssZHt7DJOZlV6dgUH1poCupItpys=; b=XkUtVVstE+DWoyPI9CwVLD+2wPKmS8ePGbhGtRm1Q5CKQPHA3euLKwedIIWf36mARC X4KcL2ufDDWwk7VktbOYwd6ZKw+ZlVGTe5kGI1aSAXWuJ9+wMp91TgixCjxg+JJEnCzh KSnOpCKj4oTF0hExtTqbTL9x3xH6e5Hb6vlGuROH+j/GZynHhksGJzFWHFf1GdYsa7vS TAjsj7GtA7t1f764es3Ld6xg11Ab9IL4G9Wuy8Z0anmKa5ZldMjtSUYSifspNL/zkjA2 YopzmfWKOHzvFCxlzwf+4QG18Duo5gfiB5cHhLwr+qZ8Zye8ewwP8Z5zh5reAlgHt2QQ 0zqQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author