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

Completion: setting up _approximate.



Hi there,

I am trying to get following string in zle:

/v/m/s/f/3

completed to:

/Volumes/Media/Series/Fargo/Season\ 03

by pressing tab.

What I am getting instead is:

── corrections (errors: 1) ──
Season\ 01/  Season\ 02/  Season\ 03/

── original ──
/v/m/s/f/3

with Season\ 01 being selected.


Interestingly when change PWD to /Volumes/Media/Series/Fargo and type
./3<tab> it completes nicely to ./Season\ 03.

When I type /v/m/s/f/*3<tab> (note *) zle gets cleared instead.

I was trying to configure matcher-list but couldn't figure out how to
make that work.

My setup:

zstyle ':completion:*' completer _complete _match _approximate

zstyle ':completion:*' matcher-list \
  '' \
  'm:{a-z\-}={A-Z\_}' \
  'r:[^[:alpha:]]||[[:alpha:]]=** r:|=* m:{a-z\-}={A-Z\_}' \
  'r:[[:ascii:]]||[[:ascii:]]=** r:|=* m:{a-z\-}={A-Z\_}'

I am not sure if anything else from my configuration is relevant. I have
AUTO_CD set and it's the same for with and without cd.

-- 
Kamil



Messages sorted by: Reverse Date, Date, Thread, Author