I currently have zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' which will ignore the case when auto completing directories. However is it possible to type a certain part of the directory and it will attempt to auto complete?

For example If it type ocum it will auto complete to Documents or eskt it will complete to Desktop?


You need to allow correction if completion is not possible, and also set autocd if you just want to write ocum instead of cd ocum to enter Documents.

So the correct commands chain in .zshrc is

# load + start compinit
autoload -U compinit && compinit

# automatic cd into directory
setopt autocd

# correct if completion is no possible
zstyle ':completion:*' completer _complete _approximate

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.