add base setup with dotter

This commit is contained in:
Alexander Navarro 2024-11-08 22:53:56 +00:00 committed by aleidk
parent 6b0da868bb
commit 42e6595b60
177 changed files with 1062 additions and 70 deletions

View 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