forked from extern/nushell
caf1432dc7
# Description i've always found the `ansi --help` extra usage hard to read and understand... i decided to give it a shot today, so here is what i came up 😋 - make the extra usage structured with `nushell` tables - make the examples clearer with variables and comments one change that might appear strange is the following last two commits ```diff diff --git a/crates/nu-command/src/platform/ansi/ansi_.rs b/crates/nu-command/src/platform/ansi/ansi_.rs index 4746d27fa..ba3e597c4 100644 --- a/crates/nu-command/src/platform/ansi/ansi_.rs +++ b/crates/nu-command/src/platform/ansi/ansi_.rs @@ -507,10 +507,7 @@ impl Command for AnsiCommand { fn signature(&self) -> Signature { Signature::build("ansi") - .input_output_types(vec![ - (Type::Nothing, Type::String), - (Type::List(Box::new(Type::String)), Type::String), - ]) + .input_output_types(vec![(Type::Nothing, Type::String)]) .optional( "code", SyntaxShape::Any, ``` `ansi` is never used on `list` inputs, as can be seen in the `Ansi.run` function: `_input: PipelineData` is never used. this broke the tests (see [this action](https://github.com/nushell/nushell/actions/runs/4589552235/jobs/8104520078#step:4:1392)) for no real reason... # User-Facing Changes hopefully an easier to read `help ansi` page. # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. |
||
---|---|---|
.. | ||
assets | ||
src | ||
tests | ||
Cargo.toml | ||
LICENSE |