Commit 37b9bb1e4f52f2563680b59d194368c4376106a9

Authored by Shrikant Sharat
1 parent 80fd53711d

Rollback #36. compdef is required by many plugins.

compinit has to be initialized before loading any plugins, since most of the
utilize `compdef`.

Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff

... ... @@ -338,7 +338,6 @@ antigen-apply () {
338 338 # TODO: Only load completions if there are any changes to the bundle
339 339 # repositories.
340 340 compinit -i
341   - compdef _antigen antigen
342 341 }
343 342  
344 343 antigen-list () {
... ... @@ -591,8 +590,13 @@ antigen () {
591 590 https://github.com/robbyrussell/oh-my-zsh.git
592 591 -set-default ADOTDIR $HOME/.antigen
593 592  
594   - # Load the compinit module.
  593 + # Load the compinit module. Required for `compdef` to be defined, which is
  594 + # used by many plugins to define completions.
595 595 autoload -U compinit
  596 + compinit -i
  597 +
  598 + # Setup antigen's own completion.
  599 + compdef _antigen antigen
596 600 }
597 601  
598 602 # Same as `export $1=$2`, but will only happen if the name specified by `$1` is