mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 05:40:08 +00:00
feat(plugins): add plugin for deno
(#9847)
Co-authored-by: Kapil Pau <kapilpau@hotmail.com> Co-authored-by: CallMeLaNN <CallMeLaNN@users.noreply.github.com>
This commit is contained in:
parent
7ed8888c5b
commit
6cc12e031e
3 changed files with 40 additions and 0 deletions
1
plugins/deno/.gitignore
vendored
Normal file
1
plugins/deno/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
_deno
|
18
plugins/deno/README.md
Normal file
18
plugins/deno/README.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Deno Plugin
|
||||||
|
|
||||||
|
This plugin sets up completion and aliases for [Deno](https://deno.land).
|
||||||
|
|
||||||
|
## Aliases
|
||||||
|
|
||||||
|
| Alias | Full command |
|
||||||
|
| ----- | ---------------- |
|
||||||
|
| db | deno bundle |
|
||||||
|
| dc | deno compile |
|
||||||
|
| dca | deno cache |
|
||||||
|
| dfmt | deno fmt |
|
||||||
|
| dh | deno help |
|
||||||
|
| dli | deno lint |
|
||||||
|
| drn | deno run |
|
||||||
|
| drw | deno run --watch |
|
||||||
|
| dts | deno test |
|
||||||
|
| dup | deno upgrade |
|
21
plugins/deno/deno.plugin.zsh
Normal file
21
plugins/deno/deno.plugin.zsh
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# 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
|
Loading…
Reference in a new issue