Commit f554ec3587e232dd2e6a223f07371db512de5459

Authored by Shrikant Sharat
1 parent 3c5772717f

Autoload compinit only once.

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

... ... @@ -198,8 +198,9 @@ bundle-theme () {
198 198  
199 199 bundle-init () {
200 200 # Initialize completion.
201   - # FIXME: Ensure this runs only once.
202   - autoload -U compinit
  201 + if ! type compinit &>/dev/null; then
  202 + autoload -U compinit
  203 + fi
203 204 compinit -i
204 205 }
205 206