Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
grigorii-horos committed Apr 19, 2017
1 parent 1c578fc commit 01dd83d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
16 changes: 15 additions & 1 deletion _zpm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ _1st_arguments=(
'load:Load plugin'
)

local -a _ZPM_Plugins_core__unused
for plugin in "$_ZPM_DIR/plugins/"*; do
_ZPM_Plugins_core__unused+=$( basename "$plugin")
done

local -a _ZPM_Plugins_3rdparty__unused
for plugin in "$_ZPM_PLUGIN_DIR/"*---*; do
local unused=$( basename "$plugin")
_ZPM_Plugins_3rdparty__unused+=${unused//---/\/}
done

local -a _ZPM_Plugins_upgradable
_ZPM_Plugins_upgradable=( ${_ZPM_Plugins_core__unused[@]} ${_ZPM_Plugins_3rdparty__unused[@]})

_arguments \
'*:: :->subcmds' && return 0

Expand All @@ -21,7 +35,7 @@ if (( CURRENT > 1 )); then
_describe -t commands "zpm plugins" _ZPM_Plugins_3rdparty
;;
l|load)
_describe -t commands "zpm plugins" _ZPM_Plugins_core
_describe -t commands "zpm plugins" _ZPM_Plugins_upgradable
;;
esac
fi
Expand Down
2 changes: 1 addition & 1 deletion lib/functions.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function _ZPM-plugin-path() {
elif [[ $(_ZPM-plugin-type $1) == 'core' ]]; then
echo "${_ZPM_DIR}/plugins/${1}"
else
echo "${_ZPM_PLUGIN_DIR}/${1//\//--}"
echo "${_ZPM_PLUGIN_DIR}/${1//\//---}"
fi
}

Expand Down
1 change: 1 addition & 0 deletions zpm.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ function ZPM-upgrade(){
_ZPM-upgrade $@
}

zstyle ':completion:*:(zpm):*' sort false

0 comments on commit 01dd83d

Please sign in to comment.