dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit da47e055bac63e2d23e18f15c7fca1b7b7a554cd
parent 0c3b42487b8fd711d292313a253b1962e4ed2634
Author: Chris Bracken <chris@bracken.jp>
Date:   Thu, 17 Oct 2019 09:05:20 -0700

Better comments around zsh completion config

Specifically, `zstyle :compinstall filename "$HOME/.zshrc" is
unnecessary, since it's the default if left unspecified, however, adding
it does save a couple fallback checks on shell startup. This specifies
the filename to which the `compinstall` command should write completion
configuration, if run manually.

That said, I'm more likely to hand-edit in the necessary zstyle commands
than have compinstall walk me through it if I ever feel like changing my
completion config.

Diffstat:
M.zshrc | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/.zshrc b/.zshrc @@ -29,14 +29,20 @@ bindkey -v bindkey '^Y' push-line bindkey '^R' history-incremental-search-backward -# Completion. +# Add zsh completion definition dirs. if [[ "$(uname -s)" == "Darwin" ]]; then fpath=($HOME/.homebrew/share/zsh/site-functions $fpath) fi -zstyle :compinstall filename "$HOME/.zshrc" -autoload -Uz compinit && compinit + +# Specify where compinstall writes cfg commands. Default, but saves checks. +zstyle ':compinstall' filename "$HOME/.zshrc" + +# Use menu-style autocompletion. zstyle ':completion:*' menu select +# Initialize completion for current session. +autoload -Uz compinit && compinit + # Current git branch (for prompt). git_branch() { local branch