ohmyzsh/plugins/deno/deno.plugin.zsh
Carlo Sala 6cc12e031e
feat(plugins): add plugin for deno (#9847)
Co-authored-by: Kapil Pau <kapilpau@hotmail.com>
Co-authored-by: CallMeLaNN <CallMeLaNN@users.noreply.github.com>
2021-04-25 19:14:05 +02:00

22 lines
574 B
Bash

# 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
if [[ ! -f $ZSH_CACHE_DIR/deno_version ]] \
|| [[ "$(deno --version)" != "$(< "$ZSH_CACHE_DIR/deno_version")" ]] \
|| [[ ! -f $ZSH/plugins/deno/_deno ]]; then
deno completions zsh > $ZSH/plugins/deno/_deno
deno --version > $ZSH_CACHE_DIR/deno_version
fi
fi