nushell/crates/nu-command/src/strings
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
..
encode_decode FIX: redirect to encode base64 as hash bash64 is deprecated (#8351) 2023-03-07 20:04:54 +01:00
format Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
split Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
str_ Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
char_.rs Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
detect_columns.rs Uniformize usage() and extra_usage() message ending for commands helper. (#8268) 2023-02-28 21:33:02 -08:00
mod.rs Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
parse.rs Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
size.rs Document and critically review ShellError variants - Ep. 1 (#8229) 2023-03-01 20:34:48 +01:00