forked from extern/nushell
Deprecate hash base64
, extend decode
and add encode
commands (#5863)
* feat: deprecate `hash base64` command * feat: extend `decode` and `encode` command families This commit - Adds `encode` command family - Backports `hash base64` features to `encode base64` and `decode base64` subcommands. - Refactors code a bit and extends tests for encodings - `decode base64` returns a binary `Value` (that may be decoded into a string using `decode` command) * feat: add `--binary(-b)` flag to `decode base64` Default output type is now string, but binary can be requested using this new flag.
This commit is contained in:
@ -170,6 +170,9 @@ pub fn create_default_context(cwd: impl AsRef<Path>) -> EngineState {
|
||||
BuildString,
|
||||
Char,
|
||||
Decode,
|
||||
Encode,
|
||||
DecodeBase64,
|
||||
EncodeBase64,
|
||||
DetectColumns,
|
||||
Format,
|
||||
FileSize,
|
||||
@ -382,7 +385,7 @@ pub fn create_default_context(cwd: impl AsRef<Path>) -> EngineState {
|
||||
Hash,
|
||||
HashMd5::default(),
|
||||
HashSha256::default(),
|
||||
Base64,
|
||||
HashBase64,
|
||||
};
|
||||
|
||||
// Experimental
|
||||
|
Reference in New Issue
Block a user