Skip to content

remove the --encoding option from register in the examples - #8038

Merged
fdncred merged 2 commits into
nushell:mainfrom
amtoine:fix/deprecated-documentation
Feb 11, 2023
Merged

fdncred merged 2 commits into
nushell:mainfrom
amtoine:fix/deprecated-documentation

Conversation

@amtoine

@amtoine amtoine commented Feb 11, 2023 •

Copy link
Copy Markdown
Member

Description

As register does not have --encoding as an option now, the Git stat plugin for Nushell is not correct anymore

> register ~/.local/share/cargo/bin/nu_plugin_gstat --encoding msgpack
Error: nu::parser::unknown_flag (link)

  × The `register` command doesn't have flag `encoding`.
   ╭─[entry #22:1:1]
 1 │ register ~/.local/share/cargo/bin/nu_plugin_gstat --encoding msgpack
   ·                                                   ─────┬────
   ·                                                        ╰── unknown flag
   ╰────
  help: Available flags: --help(-h), --shell(-s). Use `--help` for more information.

This PR then simply removes --encoding msgpack from the register call in the documentation of the gstat plugin.

User-Facing Changes

There is no user-facing change in this PR.

Tests + Formatting

This PR does not change any source code.

After Submitting

Same here, nothing to report 😉

This commit mitigates the following error, because `register` does
not have `--encoding` as an option now
```
> register ~/.local/share/cargo/bin/nu_plugin_gstat --encoding msgpack
Error: nu::parser::unknown_flag (link)

  × The `register` command doesn't have flag `encoding`.
   ╭─[entry nushell#22:1:1]
 1 │ register ~/.local/share/cargo/bin/nu_plugin_gstat --encoding msgpack
   ·                                                   ─────┬────
   ·                                                        ╰── unknown flag
   ╰────
  help: Available flags: --help(-h), --shell(-s). Use `--help` for more information.
```
I did not check the other files, but there is a `--encoding` flag
on `register` in two other plugins.

```bash
> rg -- "--encoding"
crates/nu_plugin_inc/README.md
13:register <path to installed plugin> --encoding json

crates/nu_plugin_query/README.md
13:> register <path to installed plugin> --encoding json
```
@amtoine

amtoine commented Feb 11, 2023

Copy link
Copy Markdown
Member Author

i forgot about the other plugins 👀

see the new 5f5f1ec

now rg -- "--encoding" does not give any output anymore 👌

@amtoine

amtoine commented Feb 11, 2023

Copy link
Copy Markdown
Member Author

additional information

i'm using the latest nushell

key value
version 0.75.1
branch main
commit_hash f4bd78b
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.66.1 (90743e729 2023-01-10)
rust_channel 1.66.1-x86_64-unknown-linux-gnu
cargo_version cargo 1.66.1 (ad779e08b 2023-01-10)
pkg_version 0.75.1
build_time 2023-02-11 11:32:11 +01:00
build_rust_channel release
features database, default, trash, which, zip
installed_plugins gstat

@fdncred

fdncred commented Feb 11, 2023

Copy link
Copy Markdown
Contributor

good catch. thanks!

@fdncred
fdncred added this pull request to the merge queue Feb 11, 2023
Merged via the queue into nushell:main with commit 7103497 Feb 11, 2023
@amtoine
amtoine deleted the fix/deprecated-documentation branch February 11, 2023 15:18
@amtoine

amtoine commented Feb 11, 2023

Copy link
Copy Markdown
Member Author

good catch. thanks!

my pleasure 😋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants