1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/usr/bin/env zsh 0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" 0="${${(M)0:#/*}:-$PWD/$0}" cd ${0:h} setopt all_export source .env unsetopt all_export if [[ -f $1 ]]; then ./venv/bin/python3 $1 elif [[ -f scripts/$1 ]]; then ./venv/bin/python3 scripts/$1 else print -u2 "Computer says no" && exit 1 fi exit $?