first commit
config imported from personal dotfiles aleee-idk/dots
This commit is contained in:
commit
d3a88cbb28
85 changed files with 5236 additions and 0 deletions
20
chezmoi/dot_config/zsh/completions/_cht
Normal file
20
chezmoi/dot_config/zsh/completions/_cht
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#compdef cht.sh
|
||||
__CHTSH_LANGS=($(curl -s cheat.sh/:list))
|
||||
_arguments -C \
|
||||
'--help[show this help message and exit]: :->noargs' \
|
||||
'--shell[enter shell repl]: :->noargs' \
|
||||
'1:Cheat Sheet:->lang' \
|
||||
'*::: :->noargs' && return 0
|
||||
|
||||
if [[ CURRENT -ge 1 ]]; then
|
||||
case $state in
|
||||
noargs)
|
||||
_message "nothing to complete";;
|
||||
lang)
|
||||
compadd -X "Cheat Sheets" ${__CHTSH_LANGS[@]};;
|
||||
*)
|
||||
_message "Unknown state, error in autocomplete";;
|
||||
esac
|
||||
|
||||
return
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue