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

completion: teach config about keys #4891

Merged
merged 1 commit into from
Nov 18, 2024
Merged

completion: teach config about keys #4891

merged 1 commit into from
Nov 18, 2024

Conversation

senekor
Copy link
Contributor

@senekor senekor commented Nov 16, 2024

There are two known limitations right now:

  • Only statically known keys are suggested.

  • Keys that the user did not set are still suggested for jj config get. Running that suggestion may result in an error. The error message will be appropriate though and there is some value in letting the user know that this config value theoretically exists. Some users may try to explore what configurations are available via the completions.

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

@senekor senekor mentioned this pull request Nov 16, 2024
18 tasks
cli/Cargo.toml Outdated Show resolved Hide resolved
cli/src/commands/config/unset.rs Outdated Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
cli/src/commands/config/get.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

cli/src/config_schema.rs Outdated Show resolved Hide resolved
cli/src/config_schema.rs Outdated Show resolved Hide resolved
cli/tests/test_completion.rs Outdated Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
cli/src/complete.rs Outdated Show resolved Hide resolved
cli/src/complete.rs Show resolved Hide resolved
There are two known limitations right now:

- Only statically known keys are suggested.

- Keys that the user did not set are still suggested for `jj config get`.
  Running that suggestion may result in an error. The error message will be
  appropriate though and there is some value in letting the user know that
  this config value theoretically exists. Some users may try to explore what
  configurations are available via the completions.
@senekor senekor merged commit ecd64aa into main Nov 18, 2024
31 checks passed
@senekor senekor deleted the remo/kzvuxrrqnxuw branch November 18, 2024 12:19
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.

2 participants