nushell / nushell/nushell

An option to `help` to partially silence output

Open
#14,223 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A:help-system category:enhancement
Dominant language
Rust
Stars
40.5k
Forks
2.3k
Avg merge
1d 19h
Merged PRs (30d)
85

Description

Related problem

I use such pattern a lot in my scripts, which gives nice subcommands experience

def main {
  help main
}

def "main foo" {
  # do something
}

There's one annoyance though: help command always outputs a table with input/output types. Such a table is useless for scripts because a script can only output text, but takes a lot of space in the output:

~ ❯ ./script 
Usage:
  > script 

Subcommands:
  script foo - 

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

Input/output types:
  ╭───┬───────┬────────╮
  │ # │ input │ output │
  ├───┼───────┼────────┤
  │ 0 │ any   │ any    │
  ╰───┴───────┴────────╯
Describe the solution you'd like

It would be great to skip the types table in the help output via:

  1. either an option: help --skip-types
  2. or autodetection of the help being invoked in the main function of a script

To me 1 seems much simpler.

Describe alternatives you've considered

No response

Additional context and details

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the help command entry point and trace how its output, especially the input/output types table, is assembled. Review how existing help options are defined, then make the proposed option suppress that table while preserving the remaining help output and verify the behavior for the script pattern shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.