1
0
mirror of https://github.com/zplug/zplug synced 2025-04-30 13:17:57 +02:00

Merge pull request #344 from zplug/fix-335

Make sure to link the results of file glob correctly
This commit is contained in:
zplug-man 2017-01-06 01:16:20 +09:00 committed by GitHub
commit 2e06c65f4b
3 changed files with 28 additions and 9 deletions

@ -22,7 +22,7 @@ __zplug::job::process::get_status_code() {
fi
cat "$_zplug_log[$target]" \
| grep "^repo:$repo" \
| grep "^repo:$repo\t" \
| awk '{print $2}' \
| cut -d: -f2
return $status

@ -229,8 +229,13 @@ __zplug::sources::github::load_command()
)
fi
else
if [[ -x $tags[dir]/${repo:t} ]]; then
sources=( "$tags[dir]/${repo:t}"(N-.) )
if [[ $tags[use] == $default_tags[use] ]]; then
# If no $tags[use] is given by the user,
# automatically add repo's basename to load-path
# if it exists as executable file
if [[ -f $tags[dir]/${repo:t} ]]; then
sources=( "$tags[dir]/${repo:t}"(N-.) )
fi
else
if [[ $tags[use] == $default_tags[use] || $tags[from] == "gh-r" ]]; then
tags[use]="*(N-*)"
@ -240,7 +245,11 @@ __zplug::sources::github::load_command()
)"} )
fi
dst=${${tags[rename-to]:+$ZPLUG_HOME/bin/$tags[rename-to]}:-"$ZPLUG_HOME/bin"}
for src ("$sources[@]") rename_hash+=("$src" "$dst")
for src in "$sources[@]"
do
chmod 755 "$src"
rename_hash+=("$src" "$dst")
done
fi
for src in "${(k)rename_hash[@]}"
do

@ -75,7 +75,7 @@ zplug clear
zplug "junegunn/fzf-bin", \
as:command, \
from:gh-r, \
rename-to:fzf
rename-to:f
# gist
zplug "b4b4r07/79ee61f7c140c63d2786", \
from:gist, \
@ -94,7 +94,7 @@ zplug clear
'(( $+aliases[gbS] ))' # "prezto" modules/git
'(( $+functions[git-dir] ))' # "prezto" modules/git
'[[ -o autocd ]]' # "prezto" modules/directory
'[[ -x $ZPLUG_HOME/bin/fzf ]]'
'[[ -x $ZPLUG_HOME/bin/f ]]'
'[[ ! -x $ZPLUG_HOME/bin/peco ]]' # for b4b4r07/zsh-gomi (on tag)
'[[ -x $ZPLUG_HOME/bin/get_last_pane_path.sh ]]'
)
@ -208,16 +208,26 @@ zplug clear
{
zplug "b4b4r07/http_code", \
as:command, \
use:"bin"
use:"bin/http_code"
zplug "monochromegane/the_platinum_searcher", \
as:command, \
from:gh-r, \
rename-to:pt, \
use:"*${(L)$(uname -s)}*amd64*"
zplug 'junegunn/fzf', \
as:command, \
use:'bin/{fzf,fzf-tmux}'
tests+=(
'[[ -x $ZPLUG_HOME/bin/http_code ]]'
'[[ -x $ZPLUG_HOME/bin/pt ]]'
'[[ ! -x $ZPLUG_HOME/bin/fzf ]]'
'[[ -x $ZPLUG_HOME/bin/fzf-tmux ]]'
)
}
zplug install || exit 1
zplug load --verbose || exit 1
zplug install || ret=1
zplug load --verbose || ret=1
# on (test case)