nushell/crates/nu-engine/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
..
compile Fix bad method links in docstrings (#13471) 2024-07-27 19:39:29 -07:00
call_ext.rs Internal representation (IR) compiler and evaluator (#13330) 2024-07-10 17:33:59 -07:00
closure_eval.rs Use Arc for environment variables on the stack (#13333) 2024-07-10 17:34:50 -07:00
column.rs Use Record's public API in a bunch of places (#10927) 2023-11-08 14:24:00 +01:00
command_prelude.rs Internal representation (IR) compiler and evaluator (#13330) 2024-07-10 17:33:59 -07:00
documentation.rs Rework help generation internals (#13531) 2024-08-05 22:44:24 +02:00
env.rs Update config directly at assignment (#13332) 2024-07-11 06:09:33 -07:00
eval_helpers.rs Internal representation (IR) compiler and evaluator (#13330) 2024-07-10 17:33:59 -07:00
eval_ir.rs Overhaul $in expressions (#13357) 2024-07-17 16:02:42 -05:00
eval.rs Clippy fixes for toolchain bump (#13497) 2024-07-31 14:49:22 +02:00
glob_from.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
lib.rs Add top-level crate documentation/READMEs (#12907) 2024-07-14 10:10:41 +02:00
scope.rs Use CommandType in more places (#12832) 2024-05-18 23:37:31 +00:00