zsh-workers
 help / color / mirror / code / Atom feed
* zsh completer _approximate completer
@ 2013-02-28  6:27 joe M
  2013-02-28  6:42 ` joe M
  0 siblings, 1 reply; 9+ messages in thread
From: joe M @ 2013-02-28  6:27 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-03-02  4:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-28  6:27 zsh completer _approximate completer joe M
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

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