1
0
mirror of https://github.com/zplug/zplug synced 2025-09-01 10:40:45 +02:00
zplug/autoload/utils/__options__
2016-02-22 17:12:10 +09:00

32 lines
462 B
Bash

#!/bin/zsh
__import "print/print"
local arg opt
arg="${1:?}"
opt="__${arg##*-}__"
shift
case "$arg" in
"-")
# TODO
;;
"--")
# TODO
;;
*)
if [[ -f $ZPLUG_ROOT/autoload/options/$opt ]]; then
# call option file if exists
$opt "$@"
else
__zplug::print::print::die \
"[zplug] $arg: no such option\n"
return 1
fi
;;
esac