[zsh] Add Nim completions.

This commit is contained in:
Keanu Timmermans 2021-06-28 18:24:10 +02:00
parent e15d2f0751
commit 1ec88ffdc3
Signed by: keanucode
GPG Key ID: A7431C0D513CA93B
1 changed files with 20 additions and 14 deletions

View File

@ -6,24 +6,30 @@ _plugin() {
_perf_timer_stop "plugin $1" _perf_timer_stop "plugin $1"
} }
_plugin keybase-compl 'https://raw.githubusercontent.com/fnoris/keybase-zsh-completion/master/_keybase' from=url \
after_load='plugin-cfg-path fpath prepend ""'
_plugin gitio 'denysdovhan/gitio-zsh' _plugin gitio 'denysdovhan/gitio-zsh'
# Load the brilliant project management tool.
_plugin project 'https://git.sr.ht/~keanucode/scripts/blob/master/project/project.zsh' from=url \ _plugin project 'https://git.sr.ht/~keanucode/scripts/blob/master/project/project.zsh' from=url \
build="wget -O listbox.zsh https://raw.githubusercontent.com/gko/listbox/master/listbox.zsh" \ build="wget -O listbox.zsh https://raw.githubusercontent.com/gko/listbox/master/listbox.zsh" \
load="listbox.zsh" \ load="listbox.zsh" \
load="project.zsh" \ load="project.zsh" \
# from Dima, assuming it's based off of: # Completions {{{
# https://github.com/dmitmel/dotfiles/blob/19d80233265629b33cf57daf05a928239b0c73a8/zsh/plugins.zsh#L17-L25 # from Dima, assuming it's based off of:
if gh_bin="$(command_locate gh)" && [[ -n "$gh_bin" ]]; then # https://github.com/dmitmel/dotfiles/blob/19d80233265629b33cf57daf05a928239b0c73a8/zsh/plugins.zsh#L17-L25
gh_comp_path="${ZSH_CACHE_DIR}/site-functions/_gh" if gh_bin="$(command_locate gh)" && [[ -n "$gh_bin" ]]; then
if [[ "$gh_bin" -nt "$gh_comp_path" || ! -s "$gh_comp_path" ]]; then gh_comp_path="${ZSH_CACHE_DIR}/site-functions/_gh"
_perf_timer_start "generate gh completions" if [[ "$gh_bin" -nt "$gh_comp_path" || ! -s "$gh_comp_path" ]]; then
"$gh_bin" completion -s zsh >| "$gh_comp_path" _perf_timer_start "generate gh completions"
_perf_timer_stop "generate gh completions" "$gh_bin" completion -s zsh >| "$gh_comp_path"
fi _perf_timer_stop "generate gh completions"
unset gh_comp_path fi
fi; unset gh_bin unset gh_comp_path
fi; unset gh_bin
_plugin nim-compl 'https://raw.githubusercontent.com/nim-lang/Nim/devel/tools/nim.zsh-completion' from=url \
after_load='plugin-cfg-path fpath prepend ""'
_plugin keybase-compl 'https://raw.githubusercontent.com/fnoris/keybase-zsh-completion/master/_keybase' from=url \
after_load='plugin-cfg-path fpath prepend ""'
# }}}