added exercism and bashhub

This commit is contained in:
Nikolas Weger 2017-09-12 16:15:08 +02:00
parent 589846b53d
commit 55eb975a05
2 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,39 @@
_exercism() {
local curcontext="$curcontext" state line
typeset -A opt_args
local -a options
options=(debug:"Outputs useful debug information."
configure:"Writes config values to a JSON file."
demo:"Fetches a demo problem for each language track on exercism.io."
fetch:"Fetches your current problems on exercism.ios well as the next unstarted problem in each language."
restore:"Restores completed and current problems on from exercism.iolong with your most recent iteration for each."
submit:"Submits a new iteration to a problem on exercism.io."
unsubmit:"Deletes the most recently submitted iteration."
tracks:"List the available language tracks"
download:"Downloads and saves a specified submission into the local system"
help:"Shows a list of commands or help for one command")
_arguments -s -S \
{-c,--config}"[path to config file]" \
{-d,--debug}"[turn on verbose logging]" \
{-h,--help}"[show help]" \
{-v,--version}"[print the version]" \
'(-): :->command' \
'*: :' \
&& return 0;
case $state in
(command)
_describe 'commands' options ;;
*)
case $words[2] in
*submit)
_files
;;
esac
esac
}
compdef '_exercism' exercism

View file

@ -5,6 +5,8 @@ alias la='ls -lAh'
alias psg='ps aux | grep -v grep | grep' alias psg='ps aux | grep -v grep | grep'
clearall () { clear; printf '\033[3J' } clearall () { clear; printf '\033[3J' }
source ${HOME}/.bashhub/bashhub.zsh
for file in ${dotcfg}/zsh/cfg.d/source.d/*.zsh; do for file in ${dotcfg}/zsh/cfg.d/source.d/*.zsh; do
source $file source $file
done done