diff --git a/crates/nu-command/src/strings/encode_decode/decode_base64.rs b/crates/nu-command/src/strings/encode_decode/decode_base64.rs index 0be82c503d..b4aa34d1e8 100644 --- a/crates/nu-command/src/strings/encode_decode/decode_base64.rs +++ b/crates/nu-command/src/strings/encode_decode/decode_base64.rs @@ -1,5 +1,6 @@ use super::base64::{operate, ActionType, Base64CommandArguments, CHARACTER_SET_DESC}; use nu_engine::command_prelude::*; +use nu_protocol::{report_warning_new, ParseWarning}; #[derive(Clone)] pub struct DecodeBase64Old; @@ -77,6 +78,16 @@ impl Command for DecodeBase64Old { call: &Call, input: PipelineData, ) -> Result { + report_warning_new( + engine_state, + &ParseWarning::DeprecatedWarning { + old_command: "decode base64".into(), + new_suggestion: "the new `decode new-base64` version".into(), + span: call.head, + url: "`help decode new-base64`".into(), + }, + ); + let character_set: Option> = call.get_flag(engine_state, stack, "character-set")?; let binary = call.has_flag(engine_state, stack, "binary")?; diff --git a/crates/nu-command/src/strings/encode_decode/encode_base64.rs b/crates/nu-command/src/strings/encode_decode/encode_base64.rs index eaa3bdc907..cb9ad1dbb1 100644 --- a/crates/nu-command/src/strings/encode_decode/encode_base64.rs +++ b/crates/nu-command/src/strings/encode_decode/encode_base64.rs @@ -1,5 +1,6 @@ use super::base64::{operate, ActionType, Base64CommandArguments, CHARACTER_SET_DESC}; use nu_engine::command_prelude::*; +use nu_protocol::{report_warning_new, ParseWarning}; #[derive(Clone)] pub struct EncodeBase64Old; @@ -81,6 +82,16 @@ impl Command for EncodeBase64Old { call: &Call, input: PipelineData, ) -> Result { + report_warning_new( + engine_state, + &ParseWarning::DeprecatedWarning { + old_command: "encode base64".into(), + new_suggestion: "the new `encode new-base64` version".into(), + span: call.head, + url: "`help encode new-base64`".into(), + }, + ); + let character_set: Option> = call.get_flag(engine_state, stack, "character-set")?; let binary = call.has_flag(engine_state, stack, "binary")?;