ohmyzsh/tools/omz-plugin.sh
2012-03-25 14:33:02 +02:00

19 lines
384 B
Bash
Executable file

# Load plugin passed as first arg
if [ -n "$1" ]; then
PLUGIN="$ZSH/plugins/$1"
if [ -d $PLUGIN ]; then
fpath=($PLUGIN $fpath)
source $PLUGIN/*.plugin.zsh
autoload -U compinit
compinit -i
echo "$1 enabled!"
else
echo "Plugin '$1' not found!"
return 1
fi
else
echo "Please specify a plugin"
return 1
fi