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

Implement help subcommands #387

Merged
merged 1 commit into from
Dec 19, 2022
Merged

Implement help subcommands #387

merged 1 commit into from
Dec 19, 2022

Conversation

nineinchnick
Copy link
Member

The \? command already printed help for all available commands, but it also should support subcommands for options and variables. This PR implements them and adds autocomplete.

Things to look at:

  • Options are always printed to stdout, ignoring the handler's settings.
  • All variable names and descriptions are kept in lists but converted to a string, it might as well be just one big string. I did not attempt to refactor the code so they're all defined in a single place.
  • I did not attempt to address Document all supported environment variables in README #379 since the README is big enough already and variables are also already referenced in a few places. I'm not convinced copying the output of \? variables there would help.

Resolves #384 and partially resolves #258

BTW I noticed the release plugin gathers release notes from PRs so I'll try to avoid committing important changes directly to the default branch.

env/types.go Outdated Show resolved Hide resolved
env/types.go Outdated Show resolved Hide resolved
metacmd/cmds.go Show resolved Hide resolved
@kenshaw kenshaw merged commit 183c7c0 into xo:master Dec 19, 2022
kenshaw added a commit to xo/homebrew-xo that referenced this pull request Dec 19, 2022
## What's Changed
* Implement help subcommands by @nineinchnick in xo/usql#387

**Full Changelog**: xo/usql@v0.13.2...v0.13.3
archlinux-github pushed a commit to archlinux/aur that referenced this pull request Dec 19, 2022
## What's Changed
* Implement help subcommands by @nineinchnick in xo/usql#387

**Full Changelog**: xo/usql@v0.13.2...v0.13.3
@nineinchnick nineinchnick deleted the help-commands branch January 30, 2023 10:47
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.

\? with argument returns error expand documentation and add more to \? command
2 participants