function __scriptura_run --description 'Run a script' --argument-names target if path is --perm exec $target set --export SCRIPTURA_ROOT $SCRIPTURA_ROOT set --export SD (path dirname $target) eval $target $argv[2..] return $status else echo "scriptura: $target is not executable" >&2 __scriptura_cat $target return $status end end