nushell/crates/nu-cli/src
Stefan Holderbach 9172b22985
Rework help generation internals (#13531)
Reworking some of the sprawling code we use to generate the `help cmd`
or `cmd --help` output.

This touches mainly the rendering and not the gathering of the necessary
data (see open bugs under
[label:help-system](https://github.com/nushell/nushell/issues?q=sort%3Aupdated-desc+is%3Aopen+label%3Ahelp-system))

Fixes #9076 
Fixes the syntax shape output on flags to be consistent.

## Example
```nushell
def test [
  positional: int,
  documented: float, # this has documentation
  default = 50,
  optional?,
  --a = "bla",
  --bla (-b) = "bla", # named with default
] {}
```

### before

![grafik](https://github.com/user-attachments/assets/1867984f-1289-4ad0-bdf5-c49ec56dfddb)


### after


![grafik](https://github.com/user-attachments/assets/8fca526f-d878-4d52-b970-fc41c7e8859c)
2024-08-05 22:44:24 +02:00
..
commands Path migration part 3: $nu paths (#13368) 2024-08-01 10:16:31 +02:00
completions feat: prefer exact match when completion mode is prefix (#13302) 2024-08-04 06:06:10 -05:00
menus Rework help generation internals (#13531) 2024-08-05 22:44:24 +02:00
config_files.rs Path migration part 3: $nu paths (#13368) 2024-08-01 10:16:31 +02:00
eval_cmds.rs Update config directly at assignment (#13332) 2024-07-11 06:09:33 -07:00
eval_file.rs Report parse warns and compile errs when running script files (#13369) 2024-07-14 10:12:55 +02:00
lib.rs Add top-level crate documentation/READMEs (#12907) 2024-07-14 10:10:41 +02:00
nu_highlight.rs Update config directly at assignment (#13332) 2024-07-11 06:09:33 -07:00
print.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
prompt_update.rs Refactor the CLI code a bit (#12782) 2024-05-10 07:29:27 +08:00
prompt.rs cleanup osc calls for shell_integration (#12810) 2024-05-08 13:34:04 -05:00
reedline_config.rs Factor out style-setting code (#13406) 2024-08-01 11:17:58 +02:00
repl.rs Path migration part 4: various tests (#13373) 2024-08-03 10:09:13 +02:00
syntax_highlight.rs Overhaul $in expressions (#13357) 2024-07-17 16:02:42 -05:00
util.rs Clippy fixes for toolchain bump (#13497) 2024-07-31 14:49:22 +02:00
validation.rs Remove old alias implementation (#8797) 2023-04-07 21:09:38 +03:00