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

Help us with better command and parameter/flag descriptions #5066

Open
fdncred opened this issue Apr 1, 2022 · 14 comments
Open

Help us with better command and parameter/flag descriptions #5066

fdncred opened this issue Apr 1, 2022 · 14 comments
Labels
completions Issues related to tab completion delight this feature would delight users documentation issues relating to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@fdncred
Copy link
Collaborator

fdncred commented Apr 1, 2022

Related problem

Some of our descriptions of commands and parameter descriptions could be more informative. Now that we've added descriptions in our completions, it would be nice to have them be as informative as possible without being too verbose.

Example of command descriptions
Screen Shot 2022-04-01 at 4 12 46 PM

Example of parameter/flag descriptions
Screen Shot 2022-04-01 at 4 13 18 PM

Describe the solution you'd like

We'd like to have helpful, concise descriptions for parameters/flags, and commands.

Describe alternatives you've considered

No response

Additional context and details

No response

@fdncred fdncred added help wanted Extra attention is needed good first issue Good for newcomers documentation issues relating to documentation delight this feature would delight users completions Issues related to tab completion labels Apr 1, 2022
@fdncred fdncred pinned this issue May 15, 2022
@rgwood rgwood unpinned this issue May 30, 2022
@rgwood rgwood pinned this issue May 30, 2022
@hyiltiz
Copy link
Contributor

hyiltiz commented Aug 23, 2022

As a minor suggestion: all descriptions should follow the same grammar rule. E.g. trims text starts with lowercase letter t while Display this help message starts with uppercase D. For non-descriptions such as deprecated command, either put them in special symbols like (deprecated command), or better, only hide them from the completion list but warn users who still use them. This way, new users are not incentivised or taught to use deprecated commands.

@fdncred
Copy link
Collaborator Author

fdncred commented Aug 23, 2022

@hyiltiz consistency would be a nice add.

@jaudiger
Copy link
Contributor

jaudiger commented Feb 7, 2023

@fdncred I was looking into the outputs of some help commands. And I noticed that sometimes the explanation of a command (aka usage) finishes by a dot, and sometimes it doesn't:

image

image

Same thing applies for extra_usage.

Also, there is an inconsistency with the arguments' description of some commands (below the command http get), some descriptions begin by a capital, where others don't:

image

I compared those outputs with ones from curl and wget, and they finish their sentence with a dot (which seems completely fine).

image

So, I would recommend the following things:

  • usage: begin by a capital and end with a dot
  • extra_usage: begin by a capital and end with a dot
  • Argument desc: begin by a capital and do not end with a dot

Now, the last remaining thing: should we apply the same rules to the description of the examples? Should we begin those descriptions by a capital and prevent the ending with a dot?

I'm completely opened to any suggestion here, and I would be happy to work on this uniformization. But, how could we prevent those deviations in the future? To prevent to do the same work multiples times in the future, and to reduce the PR review cumbersome on this part.

@fdncred
Copy link
Collaborator Author

fdncred commented Feb 7, 2023

@jaudiger Agreed. Some consistency would be nice. I think the example descriptions should have some uniformity too.

@amtoine
Copy link
Member

amtoine commented Feb 28, 2023

with my new interest in help and as a continuation to #8189, i wanted to go through the commands and look at their help and try to improve their messages and their examples!

is there some work being done here?
if not, i'd like to help making the help a bit better as i can 😌

@jaudiger
Copy link
Contributor

@amtoine I just opened an MR to begin to work on the first two bullets points cited in my last comment. As for now, I just update the messages to make sure they all end with the same terminal character.

rgwood pushed a commit that referenced this issue Mar 1, 2023
…er. (#8268)

# Description

Working on uniformizing the ending messages regarding methods usage()
and extra_usage(). This is related to the issue
#5066 after discussing it with
@jntrnr

# User-Facing Changes

None.

# Tests + Formatting

Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass

# After Submitting

If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
@amtoine
Copy link
Member

amtoine commented Mar 1, 2023

@amtoine I just opened an MR to begin to work on the first two bullets points cited in my last comment. As for now, I just update the messages to make sure they all end with the same terminal character.

nice, that's cool thanks for the pointer 😋

@sophiajt
Copy link
Member

@fdncred - we may want to turn this into a list of commands that need better help text so people can find where to jump in a bit more easily.

@fdncred
Copy link
Collaborator Author

fdncred commented Aug 10, 2023

@jntrnr maybe once we have a 1.0 list of commands. even still, having a list of every command and all their parameters may be unwieldy.

@Yakiyo
Copy link

Yakiyo commented Aug 19, 2023

i think help messages should all be aligned. It makes its more presentable and easier on the eyes. From jaudiger's comment above (#5066 (comment)) the help message in wget looks much much better than the ones from nu's help messages.

@amtoine amtoine mentioned this issue Aug 20, 2023
4 tasks
@amtoine
Copy link
Member

amtoine commented Aug 20, 2023

@Yakiyo and @jaudiger

i thought this was a good idea and started #10065 😋

drbrain added a commit to drbrain/nushell that referenced this issue Dec 10, 2023
Add a test to ensure that commands won't regress

Part of nushell#5066

See also nushell#8268
drbrain added a commit to drbrain/nushell that referenced this issue Dec 10, 2023
Add a test to ensure that commands won't regress

Part of nushell#5066

See also nushell#8268
fdncred pushed a commit that referenced this issue Dec 10, 2023
# Description

This repeats #8268 to make all command usage strings start with an
uppercase letter and end with a period per #5056

Adds a test to ensure that commands won't regress

Part of #5066

# User-Facing Changes

Command usage is now consistent

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

Automatic documentation updates
@drbrain
Copy link
Contributor

drbrain commented Dec 11, 2023

#11285 adds enforcement of positional arguments starting with an uppercase character and ending with a period.

While making the tests pass I noticed that most commands have positional argument descriptions that are minimally descriptive like "The thing that does stuff" a smaller amount have "Thing that does the stuff" while a few have single-word descriptions for like "Thing".

A good example of the difference is export def's required arguments:

.required("def_name", SyntaxShape::String, "Command name.")
.required("params", SyntaxShape::Signature, "Parameters.")
.required("block", SyntaxShape::Block, "Body of the definition.")

Single-word definitions that repeat the argument name aren't very helpful. For consistency these should be slightly more wordy like:

  • "The command name to define"
  • "The command parameters"
  • "The body of the command"

But maybe omitting "The"/"A"/"An" before providing a description for the argument is OK?

@amtoine
Copy link
Member

amtoine commented Dec 11, 2023

@drbrain
in the case of things like export def, i'm not even sure the help is useful at all tbh 😆
the slightly bigger versions you propose definitely sound better than what we have now!

maybe we could explain a bit more?

  • The command parameters, a comma-separated list inside []
  • The body of the command, a list of instructions inside {}

@drbrain
Copy link
Contributor

drbrain commented Dec 11, 2023

maybe we could explain a bit more?

OK

Once the next release goes out and #11285 is merged I'll make another pass.

hardfau1t pushed a commit to hardfau1t/nushell that referenced this issue Dec 14, 2023
…1278)

# Description

This repeats nushell#8268 to make all command usage strings start with an
uppercase letter and end with a period per nushell#5056

Adds a test to ensure that commands won't regress

Part of nushell#5066

# User-Facing Changes

Command usage is now consistent

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

Automatic documentation updates
WindSoilder pushed a commit that referenced this issue Dec 15, 2023
…an uppercase and end with a period. (#11285)

# Description

This updates all the positional arguments (except with
`--features=dataframe` or `--features=extra`) to start with an uppercase
letter and end with a period.

Part of #5066, specifically [this
comment](//issues/5066#issuecomment-1421528910)

Some arguments had example data removed from them because it also
appears in the examples.

There are other inconsistencies in positional arguments I noticed while
making the tests pass which I will bring up in #5066.

# User-Facing Changes

Positional arguments are now consistent

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

Automatic documentation updates
dmatos2012 pushed a commit to dmatos2012/nushell that referenced this issue Feb 20, 2024
…1278)

# Description

This repeats nushell#8268 to make all command usage strings start with an
uppercase letter and end with a period per nushell#5056

Adds a test to ensure that commands won't regress

Part of nushell#5066

# User-Facing Changes

Command usage is now consistent

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

Automatic documentation updates
dmatos2012 pushed a commit to dmatos2012/nushell that referenced this issue Feb 20, 2024
…an uppercase and end with a period. (nushell#11285)

# Description

This updates all the positional arguments (except with
`--features=dataframe` or `--features=extra`) to start with an uppercase
letter and end with a period.

Part of nushell#5066, specifically [this
comment](/nushell/issues/5066#issuecomment-1421528910)

Some arguments had example data removed from them because it also
appears in the examples.

There are other inconsistencies in positional arguments I noticed while
making the tests pass which I will bring up in nushell#5066.

# User-Facing Changes

Positional arguments are now consistent

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

Automatic documentation updates
fdncred pushed a commit that referenced this issue Mar 3, 2024
Hello! This is my first PR to nushell, as I was looking at things for
#5066. The usage text for the date commands seemed fine to me, so this
is just a bit of a tidy up of the examples, mostly the description text.

# Description

- Remove two incorrect examples for `date to-record` and `date to-table`
where nothing was piped in (which causes an error in actual use).

- Fix misleading descriptions in `date to-timezone` which erroneously
referred to Hawaii's time zone.

- Standardise on "time zone" in written descriptions.

- Generally tidy up example descriptions and improve consistency.

# User-Facing Changes

Only in related help text showing examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completions Issues related to tab completion delight this feature would delight users documentation issues relating to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants