Skip to content

Commit

Permalink
Add test command to Shell completions (#1156)
Browse files Browse the repository at this point in the history
`test` command was supported since v3.2.0, see
a8ffc31 (Add `test` command to run any unit test (\#1092), 2023-07-28)
  • Loading branch information
muzimuzhi authored Aug 20, 2024
1 parent b43bd37 commit 20d58b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion shell/exercism.fish
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ complete -f -c exercism -n "__fish_seen_subcommand_from download" -s u -l 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"
complete -f -c exercism -n "__fish_seen_subcommand_from help" -a "configure download help open submit test 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."
Expand All @@ -25,6 +25,10 @@ complete -f -c exercism -n "__fish_seen_subcommand_from open" -s h -l help -d "h
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"

# Test
complete -f -c exercism -n "__fish_use_subcommand" -a "test" -d "Run the exercise's tests."
complete -f -c exercism -n "__fish_seen_subcommand_from submit" -s h -l help -d "help for test"

# 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)"
Expand Down
2 changes: 1 addition & 1 deletion shell/exercism_completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ _exercism () {
opts="--verbose --timeout"

commands="configure download open
submit troubleshoot upgrade version workspace help"
submit test troubleshoot upgrade version workspace help"
config_opts="--show"
version_opts="--latest"

Expand Down
1 change: 1 addition & 0 deletions shell/exercism_completion.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ options=(configure:"Writes config values to a JSON file."
download:"Downloads and saves a specified submission into the local system"
open:"Opens a browser to exercism.io for the specified submission."
submit:"Submits a new iteration to a problem on exercism.io."
test:"Run the exercise's tests."
troubleshoot:"Outputs useful debug information."
upgrade:"Upgrades to the latest available version."
version:"Outputs version information."
Expand Down

0 comments on commit 20d58b1

Please sign in to comment.