Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
6bf906a2
Commit
6bf906a2
authored
Apr 12, 2011
by
Pat Regan
Browse files
Optimize plugin loading so that only one call to compinit is required
parent
16ac094a
Changes
8
Show whitespace changes
Inline
Side-by-side
oh-my-zsh.sh
View file @
6bf906a2
...
...
@@ -10,14 +10,23 @@ for config_file ($ZSH/lib/*.zsh) source $config_file
# Load all of your custom configurations from custom/
for
config_file
(
$ZSH
/custom/
*
.zsh
)
source
$config_file
#
Loa
d all
of the
plugins t
hat were defined in ~/.zshrc
#
Ad
d all
defined
plugins t
o fpath
plugin
=
${
plugin
:
=()
}
for
plugin
(
$plugins
)
source
$ZSH
/plugins/
$plugin
/
$plugin
.plugin.zsh
for
plugin
(
$plugins
)
fpath
=(
$ZSH
/plugins/
$plugin
$fpath
)
# Load and run compinit
autoload
-U
compinit
compinit
-i
# Load all of the plugins that were defined in ~/.zshrc
for
plugin
(
$plugins
)
do
if
[
-f
$ZSH
/plugins/
$plugin
/
$plugin
.plugin.zsh
]
then
source
$ZSH
/plugins/
$plugin
/
$plugin
.plugin.zsh
fi
done
# Load the theme
source
"
$ZSH
/themes/
$ZSH_THEME
.zsh-theme"
...
...
plugins/brew/brew.plugin.zsh
deleted
100644 → 0
View file @
16ac094a
# add brew completion function to path
fpath
=(
$ZSH
/plugins/brew
$fpath
)
plugins/cpanm/cpanm.plugin.zsh
deleted
100644 → 0
View file @
16ac094a
# add cpanm completion function to path
fpath
=(
$ZSH
/plugins/cpanm
$fpath
)
plugins/gem/gem.plugin.zsh
deleted
100644 → 0
View file @
16ac094a
# add gem completion function to path
fpath
=(
$ZSH
/plugins/gem
$fpath
)
plugins/github/github.plugin.zsh
deleted
100644 → 0
View file @
16ac094a
# add github completion function to path
fpath
=(
$ZSH
/plugins/github
$fpath
)
plugins/macports/macports.plugin.zsh
View file @
6bf906a2
...
...
@@ -6,5 +6,3 @@ alias puni="sudo port uninstall inactive"
alias
puo
=
"sudo port upgrade outdated"
alias
pup
=
"psu && puo"
# add macports completion function to path
fpath
=(
$ZSH
/plugins/macports
$fpath
)
plugins/pip/pip.plugin.zsh
deleted
100644 → 0
View file @
16ac094a
# add brew completion function to path
fpath
=(
$ZSH
/plugins/pip
$fpath
)
plugins/vagrant/vagrant.plugin.zsh
deleted
100644 → 0
View file @
16ac094a
fpath
=(
$ZSH
/plugins/vagrant
$fpath
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment