Skip to content

help command should include default parameter values #8928

@MariaSolOs

Description

@MariaSolOs

Related problem

Say I have the following:

# A fancy function that does something.
export def foo [
    bar: string = "bar" # Some parameter description.
] {
    print $bar
}

If I run help foo, the following is displayed:

➜ help foo
A fancy function that does something.

Usage:
  > foo (bar) 

Flags:
  -h, --help - Display the help message for this command

Parameters:
  (optional) bar <string>: Some parameter description.

Describe the solution you'd like

It would be very useful for default parameter values to also be mentioned when using help, since then I know when I can safely omit the parameter :)

Describe alternatives you've considered

No response

Additional context and details

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions