2021-04-25 17:14:05 +00:00
|
|
|
# ALIASES
|
|
|
|
alias db='deno bundle'
|
|
|
|
alias dc='deno compile'
|
|
|
|
alias dca='deno cache'
|
|
|
|
alias dfmt='deno fmt'
|
|
|
|
alias dh='deno help'
|
|
|
|
alias dli='deno lint'
|
|
|
|
alias drn='deno run'
|
|
|
|
alias drw='deno run --watch'
|
|
|
|
alias dts='deno test'
|
|
|
|
alias dup='deno upgrade'
|
|
|
|
|
|
|
|
# COMPLETION FUNCTION
|
|
|
|
if (( $+commands[deno] )); then
|
2021-09-15 16:18:25 +00:00
|
|
|
ver="$(deno --version)"
|
|
|
|
ver_file="$ZSH_CACHE_DIR/deno_version"
|
|
|
|
comp_file="$ZSH/plugins/deno/_deno"
|
|
|
|
|
|
|
|
if [[ ! -f "$comp_file" || ! -f "$ver_file" || "$ver" != "$(< "$ver_file")" ]]; then
|
|
|
|
deno completions zsh >| "$comp_file"
|
|
|
|
echo "$ver" >| "$ver_file"
|
2021-04-25 17:14:05 +00:00
|
|
|
fi
|
2021-09-15 16:18:25 +00:00
|
|
|
|
|
|
|
declare -A _comps
|
2021-04-26 09:54:53 +00:00
|
|
|
autoload -Uz _deno
|
|
|
|
_comps[deno]=_deno
|
2021-09-15 16:18:25 +00:00
|
|
|
|
|
|
|
unset ver ver_file comp_file
|
2021-04-25 17:14:05 +00:00
|
|
|
fi
|