From 487733b264b1c74dd575828e9b46ea098b03f2ce Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Mon, 26 Aug 2019 22:48:48 +0300 Subject: [PATCH] [zsh] add some comments in plugins.zsh --- zsh/plugins.zsh | 50 ++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/zsh/plugins.zsh b/zsh/plugins.zsh index 5eea920..918b6b3 100644 --- a/zsh/plugins.zsh +++ b/zsh/plugins.zsh @@ -4,31 +4,35 @@ source "$ZSH_DOTFILES/zplg.zsh" plugin completions 'zsh-users/zsh-completions' -run_compinit() { - autoload -U compinit +# compinit {{{ + # note that completion system must be initialized after zsh-completions and + # before oh-my-zsh + run_compinit() { + autoload -U compinit - local match run_compdump=1 - # glob qualifiers description: - # N turn on NULL_GLOB for this expansion - # . match only plain files - # m-1 check if the file was modified today - # see "Filename Generation" in zshexpn(1) - for match in $HOME/.zcompdump(N.m-1); do - run_compdump= - break - done + local match run_compdump=1 + # glob qualifiers description: + # N turn on NULL_GLOB for this expansion + # . match only plain files + # m-1 check if the file was modified today + # see "Filename Generation" in zshexpn(1) + for match in $HOME/.zcompdump(N.m-1); do + run_compdump= + break + done - if [[ -n "$run_compdump" ]]; then - # -D flag turns off compdump loading - compinit -D - compdump - else - # -C flag disables some checks performed by compinit - they are not needed - # because we already have a fresh compdump - compinit -C - fi -} -run_compinit + if [[ -n "$run_compdump" ]]; then + # -D flag turns off compdump loading + compinit -D + compdump + else + # -C flag disables some checks performed by compinit - they are not needed + # because we already have a fresh compdump + compinit -C + fi + } + run_compinit +# }}} # Oh-My-Zsh {{{