removed windows and linux split subdir
This commit is contained in:
parent
83dda10fa8
commit
065b982734
280 changed files with 9053 additions and 426 deletions
39
.antidote/functions/antidote-path
Normal file
39
.antidote/functions/antidote-path
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/zsh
|
||||
|
||||
### Print the path of a cloned bundle.
|
||||
#
|
||||
# usage: antidote path [-h|--help] <bundle>
|
||||
#
|
||||
#function antidote-path {
|
||||
emulate -L zsh; setopt local_options $_adote_funcopts
|
||||
|
||||
local o_help
|
||||
zparseopts $_adote_zparopt_flags -- h=o_help -help=h || return 1
|
||||
|
||||
if (( $#o_help )); then
|
||||
antidote-help path
|
||||
return
|
||||
fi
|
||||
|
||||
local -a bundles=("${(@f)$(__antidote_collect_input "$@")}")
|
||||
if (( $#bundles == 0 )); then
|
||||
print -ru2 "antidote: error: required argument 'bundle' not provided, try --help"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local bundle bundledir
|
||||
local -a results=()
|
||||
for bundle in $bundles; do
|
||||
if [[ $bundle == '$'* ]] && [[ $bundle != *'('* ]] && [[ $bundle != *';'* ]]; then
|
||||
bundle=$(eval print $bundle)
|
||||
fi
|
||||
bundledir=$(__antidote_bundle_dir $bundle)
|
||||
if [[ ! -d $bundledir ]]; then
|
||||
print -ru2 "antidote: error: $bundle does not exist in cloned paths"
|
||||
return 1
|
||||
else
|
||||
results+=("$bundledir")
|
||||
fi
|
||||
done
|
||||
print -l -- $results
|
||||
#}
|
||||
Loading…
Add table
Add a link
Reference in a new issue