mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 11:45:50 +02:00
deprecated commands (#4405)
* deprecated commands * deprecated insert command
This commit is contained in:
@ -267,6 +267,14 @@ pub enum ShellError {
|
||||
#[error("{0}")]
|
||||
#[diagnostic(help("{1}"))]
|
||||
LabeledError(String, String),
|
||||
|
||||
#[error("Deprecated command {0}")]
|
||||
#[diagnostic(code(nu::shell::deprecated_command), url(docsrs))]
|
||||
DeprecatedCommand(
|
||||
String,
|
||||
String,
|
||||
#[label = "{0} is deprecated. Instead use {1}"] Span,
|
||||
),
|
||||
}
|
||||
|
||||
impl From<std::io::Error> for ShellError {
|
||||
|
@ -52,6 +52,7 @@ pub enum Category {
|
||||
Hash,
|
||||
Generators,
|
||||
Custom(String),
|
||||
Deprecated,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Category {
|
||||
@ -77,6 +78,7 @@ impl std::fmt::Display for Category {
|
||||
Category::Hash => "hash",
|
||||
Category::Generators => "generators",
|
||||
Category::Custom(name) => name,
|
||||
Category::Deprecated => "deprecated",
|
||||
};
|
||||
|
||||
write!(f, "{}", msg)
|
||||
|
Reference in New Issue
Block a user