Skip to content

Enables and configures smart and extensive tab completion.

License

Notifications You must be signed in to change notification settings

zimfw/completion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 

Repository files navigation

completion

Enables and configures smart and extensive tab completion.

This module calls compinit for you. Remove any compinit calls from your ~/.zshrc or other startup files when using this module. An aditional .dat file is generated by this module to more accurately check if your completion configuration dumpfile is up-to-date.

Initialize this module after all modules that add completion definitions, like zsh-users/zsh-completions for example.

Many thanks to Robby Russell and Sorin Ionescu for the original code and to Roman Perepelitsa for the improved dumpfile check code.

Settings

By default, the completion configuration is dumped to ${ZDOTDIR:-${HOME}}/.zcompdump. This file is produced to speed up the completion initialization. The file path can be customized with the following zstyle:

zstyle ':zim:completion' dumpfile '/path/to/zsh_dumpfile'

The completion cache is stored in the ${ZDOTDIR:-${HOME}}/.zcompcache directory by default. This path can be customized to a proper cache directory with:

zstyle ':completion::complete:*' cache-path ${XDG_CACHE_HOME}/zsh/zcompcache

or

zstyle ':completion::complete:*' cache-path ~/.cache/zsh/zcompcache

You can also configure case sensitivity for completions and globbing by using zstyle as described below. By default, case is insensitive. To set just completions to be case sensitive, use:

zstyle ':zim:completion' case-sensitivity sensitive

To set just globbing to be case sensitive, use:

zstyle ':zim:glob' case-sensitivity sensitive

To set both to be case sensitive, use:

zstyle ':zim:*' case-sensitivity sensitive

Add the zstyles to your ~/.zshrc before where the modules are initialized.

Zsh options

  • ALWAYS_TO_END moves cursor to end of word if a full completion is inserted.
  • NO_CASE_GLOB makes globbing case insensitive (unless configured as above).
  • NO_LIST_BEEP doesn't beep on ambiguous completions.