diff --git a/Makefile b/Makefile index ae692c7..f90675c 100644 --- a/Makefile +++ b/Makefile @@ -295,6 +295,16 @@ install_asdf: check_os @echo "==================================" @echo "" +.PHONY: install_exercism +install_exercism: check_os + @echo "Installing exercism..." + @wget -O /tmp/exercism.tar.gz https://github.com/exercism/cli/releases/download/v3.0.13/exercism-3.0.13-linux-x86_64.tar.gz + @tar -xf /tmp/exercism.tar.gz -C /tmp + @mv /tmp/exercism ~/.local/bin/ + @read -p "Enter your exercism API KEY (https://exercism.org/settings/api_cli): " apikey; + @echo "Configuring exercism..." + exercism configure --token=$$apikey --workspace="~/Projects/Personal/Mixed Technology/Practice/exercism" + .PHONY: install_vim install_vim: check_os link_vim @echo "Vim package installation is no longer done automatically!" diff --git a/symlinks/config/.gitignore b/symlinks/config/.gitignore index b2efdb2..c2d36a6 100644 --- a/symlinks/config/.gitignore +++ b/symlinks/config/.gitignore @@ -77,3 +77,4 @@ evolution geary goa-1.0 touchegg +exercism diff --git a/symlinks/config/fish/completions/exercism.fish b/symlinks/config/fish/completions/exercism.fish new file mode 100644 index 0000000..dc20fdc --- /dev/null +++ b/symlinks/config/fish/completions/exercism.fish @@ -0,0 +1,54 @@ +# Configure +complete -f -c exercism -n "__fish_use_subcommand" -a "configure" -d "Writes config values to a JSON file." +complete -f -c exercism -n "__fish_seen_subcommand_from configure" -s t -l token -d "Set token" +complete -f -c exercism -n "__fish_seen_subcommand_from configure" -s w -l workspace -d "Set workspace" +complete -f -c exercism -n "__fish_seen_subcommand_from configure" -s a -l api -d "set API base url" +complete -f -c exercism -n "__fish_seen_subcommand_from configure" -s s -l show -d "show settings" + +# Download +complete -f -c exercism -n "__fish_use_subcommand" -a "download" -d "Downloads and saves a specified submission into the local system" +complete -f -c exercism -n "__fish_seen_subcommand_from download" -s e -l exercise -d "the exercise slug" +complete -f -c exercism -n "__fish_seen_subcommand_from download" -s h -l help -d "help for download" +complete -f -c exercism -n "__fish_seen_subcommand_from download" -s T -l team -d "the team slug" +complete -f -c exercism -n "__fish_seen_subcommand_from download" -s t -l track -d "the track ID" +complete -f -c exercism -n "__fish_seen_subcommand_from download" -s u -l uuid -d "the solution UUID" + +# Help +complete -f -c exercism -n "__fish_use_subcommand" -a "help" -d "Shows a list of commands or help for one command" +complete -f -c exercism -n "__fish_seen_subcommand_from help" -a "configure download help open submit troubleshoot upgrade version workspace" + +# Open +complete -f -c exercism -n "__fish_use_subcommand" -a "open" -d "Opens a browser to exercism.io for the specified submission." +complete -f -c exercism -n "__fish_seen_subcommand_from open" -s h -l help -d "help for open" + +# Submit +complete -f -c exercism -n "__fish_use_subcommand" -a "submit" -d "Submits a new iteration to a problem on exercism.io." +complete -f -c exercism -n "__fish_seen_subcommand_from submit" -s h -l help -d "help for submit" + +# Troubleshoot +complete -f -c exercism -n "__fish_use_subcommand" -a "troubleshoot" -d "Outputs useful debug information." +complete -f -c exercism -n "__fish_seen_subcommand_from troubleshoot" -s f -l full-api-key -d "display full API key (censored by default)" +complete -f -c exercism -n "__fish_seen_subcommand_from troubleshoot" -s h -l help -d "help for troubleshoot" + +# Upgrade +complete -f -c exercism -n "__fish_use_subcommand" -a "upgrade" -d "Upgrades to the latest available version." +complete -f -c exercism -n "__fish_seen_subcommand_from help" -s h -l help -d "help for help" + +# Version +complete -f -c exercism -n "__fish_use_subcommand" -a "version" -d "Outputs version information." +complete -f -c exercism -n "__fish_seen_subcommand_from version" -s l -l latest -d "check latest available version" +complete -f -c exercism -n "__fish_seen_subcommand_from version" -s h -l help -d "help for version" + +# Workspace +complete -f -c exercism -n "__fish_use_subcommand" -a "workspace" -d "Outputs the root directory for Exercism exercises." +complete -f -c exercism -n "__fish_seen_subcommand_from workspace" -s h -l help -d "help for workspace" + +# Options +complete -f -c exercism -s h -l help -d "show help" +complete -f -c exercism -l timeout -a "10" -d "10 seconds" +complete -f -c exercism -l timeout -a "30" -d "30 seconds" +complete -f -c exercism -l timeout -a "60" -d "1 minute" +complete -f -c exercism -l timeout -a "300" -d "5 minutes" +complete -f -c exercism -l timeout -a "600" -d "10 minutes" +complete -f -c exercism -l timeout -a "" -d "override default HTTP timeout" +complete -f -c exercism -s v -l verbose -d "turn on verbose logging"