nushell/crates/nu-command/src/strings/encode_decode
Antoine Stevan f34034ae58
FIX: redirect to encode base64 as hash bash64 is deprecated (#8351)
# Description
i tried yesterday to `encode` with an invalid character set and this is
what i got
```bash
>_ {alg: "HS256", type: "JWT"} | to json -r | encode base64 --character-set invalid-character-set
Error:
  × value is not an accepted character set
   ╭─[entry #11:1:1]
 1 │ {alg: "HS256", type: "JWT"} | to json -r | encode base64 --character-set invalid-character-set
   ·                                                                          ──────────┬──────────
   ·                                                                                    ╰── invalid-character-set is not a valid character-set.
Please use `help hash base64` to see a list of valid character sets.
   ╰────
```

but `hash base64` is now a deprecated command, see `help hash base64`.

=> **this PR changes the error message to mention `help encode base64`,
where the list of valid character sets is, instead**

# User-Facing Changes
```
$nothing
```

# Tests + Formatting
- 🟢 `cargo fmt --all`
- 🟢 `cargo clippy --workspace -- -D warnings -D
clippy::unwrap_used -A clippy::needless_collect`
- 🟢 `cargo test --workspace`

# After Submitting
```
$nothing
```
2023-03-07 20:04:54 +01:00
..
base64.rs FIX: redirect to encode base64 as hash bash64 is deprecated (#8351) 2023-03-07 20:04:54 +01:00
decode_base64.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
decode.rs Document and critically review ShellError variants - Ep. 1 (#8229) 2023-03-01 20:34:48 +01:00
encode_base64.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
encode.rs Document and critically review ShellError variants - Ep. 1 (#8229) 2023-03-01 20:34:48 +01:00
encoding.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
mod.rs Deprecate hash base64, extend decode and add encode commands (#5863) 2022-06-26 00:35:23 +03:00