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

fix: (fish-completion) correct value enum help text #5111

Closed
wants to merge 0 commits into from

Conversation

jporwal05
Copy link
Contributor

Resolves #5101

  • The completion of value enums now displays accurate help text
  • This fix encloses help text in single quotes
  • Comma in help text is not escaped
  • This is because the the help text is now treated as literal
  • No variable expansion or command substitution in help text

@jporwal05 jporwal05 changed the title fix(fish-completion): correct value enum help text #5101 fix(fish-completion): correct value enum help text Sep 5, 2023
@jporwal05 jporwal05 changed the title fix(fish-completion): correct value enum help text fix: (fish-completion) correct value enum help text Sep 5, 2023
@@ -84,6 +84,18 @@ fn value_hint() {
);
}

#[test]
fn value_help() {
Copy link
Member

Choose a reason for hiding this comment

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

We've recently added support for end-to-end testing of completions.

Instead of this test could you

  1. Move the choice arg to examples/exhaustive.rs under the quote subcommand?
  2. Can you add additional asserts to fn complete at the end of the file to do end-to-end verification of this behavior?

I would ask all of this be done in one commit and do whatever it takes to make it pass (even if it shows bad output) and then put the fix commit on top of it. That will help show to both you and me that the test is testing the correct situation and that the behavior is fixed.

Copy link
Contributor Author

@jporwal05 jporwal05 Sep 6, 2023

Choose a reason for hiding this comment

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

So, in summary, we need a failing commit first and then a fix for it. Effectively, there would only be two commits. Please confirm my understanding @epage. I will make the suggested changes.

Copy link
Member

Choose a reason for hiding this comment

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

To be explicit, it should be a failing commit in that it shows the via passing tests rather than tests failing.

Copy link
Member

Choose a reason for hiding this comment

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

Besides that, yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood @epage. Will raise a new PR and link here.

@jporwal05
Copy link
Contributor Author

Opened #5114
It incorporates the changes suggested here.

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.

Parentheses in doc comments for ValueEnum break generated fish completions
2 participants