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

Improve command docs #1096

Merged
merged 1 commit into from
Oct 4, 2023
Merged

Conversation

Hofer-Julian
Copy link
Contributor

Get closer to help command in some aspects, which I think is more accessible in some aspects.
Also, now the short option is included for named arguments.

Before:
before

After:
after

Comparison to help bytes add:

nu ❯ help bytes add
Add specified bytes to the input.

Search terms: append, truncate, padding

Usage:
  > bytes add {flags} <data> ...(rest)

Flags:
  -h, --help - Display the help message for this command
  -i, --index <Int> - index to insert binary data
  -e, --end - add to the end of binary

Parameters:
  data <binary>: the binary to add
  ...rest <cell-path>: for a data structure input, add bytes to the data at the given cell paths

Input/output types:
  ╭───┬──────────────┬──────────────╮
  │ # │    input     │    output    │
  ├───┼──────────────┼──────────────┤
  │ 0 │ binary       │ binary       │
  │ 1 │ list<binary> │ list<binary> │
  │ 2 │ table        │ table        │
  │ 3 │ record       │ record       │
  ╰───┴──────────────┴──────────────╯

Get closer to `help command` in some aspects.
Also now the short option is included for named parameters.
@fdncred
Copy link
Collaborator

fdncred commented Oct 4, 2023

You'd think our docs would be nearly identical to our help output but I guess not. Looks like an improvement to me. Thanks!

@hustcer
Copy link
Collaborator

hustcer commented Oct 4, 2023

Looks better indeed, let's land it. Thanks

@hustcer hustcer merged commit 5300c26 into nushell:main Oct 4, 2023
2 of 3 checks passed
@Hofer-Julian Hofer-Julian deleted the improve-command-docs branch October 4, 2023 13:22
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.

3 participants