move hash md5 and hash sha256 commands to the hash category (#8196)

# Description

For auto-generated documentation, move the `hash _` commands into the
Hash category

# User-Facing Changes

Apart from documentation, none.

# 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 -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass

# 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:
Alex Tremblay 2023-02-24 12:53:25 -05:00 committed by GitHub
parent fd1ac5106d
commit 4dd9d0d46b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,9 @@ use nu_engine::CallExt;
use nu_protocol::ast::{Call, CellPath};
use nu_protocol::engine::{Command, EngineState, Stack};
use nu_protocol::Span;
use nu_protocol::{Example, PipelineData, ShellError, Signature, SyntaxShape, Type, Value};
use nu_protocol::{
Category, Example, PipelineData, ShellError, Signature, SyntaxShape, Type, Value,
};
use std::marker::PhantomData;
pub trait HashDigest: digest::Digest + Clone {
@ -50,6 +52,7 @@ where
fn signature(&self) -> Signature {
Signature::build(self.name())
.category(Category::Hash)
.input_output_types(vec![
(Type::String, Type::String),
(Type::String, Type::Binary),