2021-04-25 19:14:05 +02: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 18:18:25 +02: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 19:14:05 +02:00
|
|
|
fi
|
2021-09-15 18:18:25 +02:00
|
|
|
|
|
|
|
declare -A _comps
|
2021-04-26 11:54:53 +02:00
|
|
|
autoload -Uz _deno
|
|
|
|
_comps[deno]=_deno
|
2021-09-15 18:18:25 +02:00
|
|
|
|
|
|
|
unset ver ver_file comp_file
|
2021-04-25 19:14:05 +02:00
|
|
|
fi
|