prezto/modules/completion
Indrajit Raychaudhuri ac1c39d2e1 completion: Detect Homebrew prefix internally, not idiomatically
For performance reasons, we prefer detecting Homebrew prefix internally
instead of the more idiomatic form `brew --prefix`.

We attempt looking up $HOMEBREW_PREFIX or $HOMEBREW_REPOSITORY first (in
case `brew shellenv` has been sourced-in earlier). Else, we look it up
by resolving absolute path of $HOMEBREW_REPOSITORY. $HOMEBREW_PREFIX is
same as $HOMEBREW_REPOSITORY except when Homebrew is installed in
'/usr/local' ($HOMEBREW_REPOSITORY == '/usr/local/Homebrew'). This is
usually the case for Intel Macs.

This should work for most standard (and officially documented) Homebrew
installations.

For implementation details in Homebrew,
see: 2a850e02d8/bin/brew (L62-L70)

Co-authored-by: mattmc3 <mattmc3@gmail.com>
2022-04-08 14:23:51 -05:00
..
external@11ad0a45ff completion: Update zsh-completions submodule to 0.33.0 2021-05-06 21:23:20 -05:00
README.md completion: Set standard style used by 'list-colors' 2021-05-21 13:37:40 -05:00
init.zsh completion: Detect Homebrew prefix internally, not idiomatically 2022-04-08 14:23:51 -05:00

README.md

Completion

Loads and configures TAB completion and provides additional completions from the zsh-completions project.

This module must be loaded late after the utility module and all other modules that provide completion definitions.

Options

  • COMPLETE_IN_WORD complete from both ends of a word.
  • ALWAYS_TO_END move cursor to the end of a completed word.
  • PATH_DIRS perform path search even on command names with slashes.
  • AUTO_MENU show completion menu on a successive TAB press.
  • AUTO_LIST automatically list choices on ambiguous completion.
  • AUTO_PARAM_SLASH if completed parameter is a directory, add a trailing slash (/).
  • EXTENDED_GLOB needed for file modification glob modifiers with compinit.
  • MENU_COMPLETE do not autoselect the first completion entry.
  • FLOW_CONTROL disable start/stop characters in shell editor.

Variables

Settings

Ignore /etc/hosts Entries

To ignore certain entries from static /etc/hosts for host completion, add the following lines in ${ZDOTDIR:-$HOME}/.zpreztorc with the IP addresses of the hosts as they appear in /etc/hosts. Both IP address and the associated hostname(s) will be ignored during host completion. However, some of the entries ignored from /etc/hosts still might appear during completion because of their presence in ssh configuration or history).

zstyle ':prezto:module:completion:*:hosts' etc-host-ignores \
    '0.0.0.0' '127.0.0.1'

Contributors

Completions should be submitted to the zsh-completions project according to its rules and regulations. This module will be synchronized against it.

Authors

The authors of this module should be contacted via the issue tracker.