Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update shell tab completion for exercism cli #759

Merged
merged 2 commits into from
Nov 5, 2018

Conversation

nywilken
Copy link
Contributor

@nywilken nywilken commented Oct 31, 2018

What this does?

The Bash and Zsh tab completion files being shipped with the latest release reference subcommands that no longer exist. This changes updates the shell completion files with references to all of the implemented commands in Exercism v2.

** Note ** auto Bash completion generation in Cobra was looked into but it appears that Cobra requires a bit of configuration for each command we would want to generate bash completions for so I am going with manual update at this time.

How to test?

  1. Follow the shell completion file install steps outlined here
  2. Test tab completion for bash or zsh (exercism <tab>)
  3. Verify list of commands as tab completion options
exercism
configure     -- Writes config values to a JSON file.
download      -- Downloads and saves a specified submission into the local system
help          -- Shows a list of commands or help for one command
open          -- Opens a browser to exercism.io for the specified submission.
submit        -- Submits a new iteration to a problem on exercism.io.
troubleshoot  -- Outputs useful debug information.
upgrade       -- Upgrades to the latest available version.
version       -- Outputs version information.
workspace     -- Outputs the root directory for Exercism exercises.

resolves #666

@nywilken
Copy link
Contributor Author

nywilken commented Nov 4, 2018

@kytrinyx I confirmed completion is working as expected for zsh and bash on my end. But I would like to confirm that the changes work as expected on another user's machine before merging. Let me know if you have time to take a look.

@kytrinyx
Copy link
Member

kytrinyx commented Nov 5, 2018

This works on my machine!

@kytrinyx kytrinyx merged commit 4ae3f85 into exercism:master Nov 5, 2018
@Atulkmr
Copy link

Atulkmr commented Feb 10, 2019

@kytrinyx why do we need additional configuration to get tab completion? Can't it come out of the box?

@kytrinyx
Copy link
Member

@Atulkmr I'm not sure I understand your question. The binary that we deliver cannot control your machine's path. The extra configuration is what tells your machine about the options for the binary.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shell completions reference old CLI commands
3 participants