Commit 8922c0a021980a69df2234c554838f90b4c26bf0
1 parent
1d1fa65fba
improve startup speed by only calling `compinit -i` once
Showing 1 changed file with 1 additions and 5 deletions Side-by-side Diff
antigen.zsh
| ... | ... | @@ -338,6 +338,7 @@ 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 | |
| 341 | 342 | } |
| 342 | 343 | |
| 343 | 344 | antigen-list () { |
| ... | ... | @@ -592,11 +593,6 @@ antigen () { |
| 592 | 593 | |
| 593 | 594 | # Load the compinit module. |
| 594 | 595 | autoload -U compinit |
| 595 | - | |
| 596 | - # Without the following, `compdef` function is not defined. | |
| 597 | - compinit -i | |
| 598 | - | |
| 599 | - compdef _antigen antigen | |
| 600 | 596 | } |
| 601 | 597 | |
| 602 | 598 | # Same as `export $1=$2`, but will only happen if the name specified by `$1` is |