zsh fuzzy completion and utility plugin with Deno.
WARNING: This project is in beta stage and WIP README.
- Insert snippet and abbrev snippet
- Completion with fzf
- Builtin git completion
- User defined completion
- ZLE utilities
zinit ice lucid depth"1" blockf
zinit light yuki-yano/zeno.zsh
$ git clone https://github.com/yuki-yano/zeno.zsh.git
$ echo "source /path/to/dir/zeno.zsh" >> ~/.zshrc
Require user configuration file
$ gs<Space>
Insert
$ git status --short --branch
$ gs<Enter>
Execute
$ git status --short --branch
$ git add <Tab>
Git Add Files> ...
Use zeno-insert-snippet zle
Use zeno-history-completion zle
Use zeno-ghq-cd zle
# if disable deno cache command when plugin loaded
# export ZENO_DISABLE_EXECUTE_CACHE_COMMAND=1
# if enable fzf-tmux
# export ZENO_ENABLE_FZF_TMUX=1
# if setting fzf-tmux options
# export ZENO_FZF_TMUX_OPTIONS="-p"
# Experimental: Use UNIX Domain Socket
export ZENO_ENABLE_SOCK=1
# if disable builtin completion
# export ZENO_DISABLE_BUILTIN_COMPLETION=1
# default
export ZENO_GIT_CAT="cat"
# git file preview with color
# export ZENO_GIT_CAT="bat --color=always"
# default
export ZENO_GIT_TREE="tree"
# git folder preview with color
# export ZENO_GIT_TREE="exa --tree"
if [[ -n $ZENO_LOADED ]]; then
bindkey ' ' zeno-auto-snippet
bindkey '^m' zeno-auto-snippet-and-accept-line
bindkey '^i' zeno-completion
fi
if [[ -n $ZENO_LOADED ]]; then
bindkey '^r' zeno-history-selection
bindkey '^x^s' zeno-insert-snippet
bindkey '^x^f' zeno-ghq-cd
fi
- git
- add
- diff
- diff file
- checkout
- checkout file
- switch
- reset
- reset file
- restore
- fixup and squash commit
- rebase
- merge
See: https://github.com/yuki-yano/zeno.zsh/blob/main/src/completion/source/git.ts
$ touch ~/.config/zeno/config.yml
and
snippets:
# snippet and keyword abbrev
- name: git status
keyword: gs
snippet: git status --short --branch
# snippet with placeholder
- name: git commit message
keyword: gcim
snippet: git commit -m '{{commit_message}}'
- name: "null"
keyword: "null"
snippet: ">/dev/null 2>&1"
# auto expand condition
# If not defined, it is only valid at the beginning of a line.
context:
# buffer: ''
lbuffer: '.+\s'
# rbuffer: ''
- name: branch
keyword: B
snippet: git symbolic-ref --short HEAD
context:
lbuffer: '^git\s+checkout\s+'
evaluate: true # eval snippet
completions:
- name: kill
patterns:
- "^kill( -9)? $"
sourceCommand: "ps -ef | sed 1d"
options:
--multi: true
--prompt: "'Kill Process> '"
callback: "awk '{print $2}'"