Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zsh completer _approximate completer



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