fix magenta_reverse and friends (#10491)

# Description

Magenta wasn't being interpreted correctly. note that `bg:
magenta_reverse attr: b` showed up as white. This was because it was
missing from the lookup and it was defaulting to white.

fixes #10490 

### Before

![image](https://github.com/nushell/nushell/assets/343840/0cf69ab8-813e-42e4-aea5-5db231f29f74)

### After

![image](https://github.com/nushell/nushell/assets/343840/d36f18f3-514d-443a-8bc8-cda2fed09615)


# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use std testing; testing run-tests --path
crates/nu-std"` to run the tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# 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.
-->
This commit is contained in:
Darren Schroeder
2023-09-24 14:43:17 -05:00
committed by GitHub
parent 95a4649cc9
commit 19cee5fda1
2 changed files with 34 additions and 14 deletions

View File

@ -247,6 +247,24 @@ pub fn lookup_style(s: &str) -> Style {
"lpbl" | "light_purple_blink" => Color::LightPurple.blink(),
"lpst" | "light_purple_strike" => Color::LightPurple.strikethrough(),
"m" | "magenta" => Color::Magenta.normal(),
"mb" | "magenta_bold" => Color::Magenta.bold(),
"mu" | "magenta_underline" => Color::Magenta.underline(),
"mi" | "magenta_italic" => Color::Magenta.italic(),
"md" | "magenta_dimmed" => Color::Magenta.dimmed(),
"mr" | "magenta_reverse" => Color::Magenta.reverse(),
"mbl" | "magenta_blink" => Color::Magenta.blink(),
"mst" | "magenta_strike" => Color::Magenta.strikethrough(),
"lm" | "light_magenta" => Color::LightMagenta.normal(),
"lmb" | "light_magenta_bold" => Color::LightMagenta.bold(),
"lmu" | "light_magenta_underline" => Color::LightMagenta.underline(),
"lmi" | "light_magenta_italic" => Color::LightMagenta.italic(),
"lmd" | "light_magenta_dimmed" => Color::LightMagenta.dimmed(),
"lmr" | "light_magenta_reverse" => Color::LightMagenta.reverse(),
"lmbl" | "light_magenta_blink" => Color::LightMagenta.blink(),
"lmst" | "light_magenta_strike" => Color::LightMagenta.strikethrough(),
"c" | "cyan" => Color::Cyan.normal(),
"cb" | "cyan_bold" => Color::Cyan.bold(),
"cu" | "cyan_underline" => Color::Cyan.underline(),