mirror of
https://github.com/nushell/nushell.git
synced 2025-05-09 09:22:57 +00:00
# Description In the past we named the process of completely removing a command and providing a basic error message pointing to the new alternative "deprecation". But this doesn't match the expectation of most users that have seen deprecation _warnings_ that alert to either impending removal or discouraged use after a stability promise. # User-Facing Changes Command category changed from `deprecated` to `removed`
16 lines
602 B
Rust
16 lines
602 B
Rust
use std::collections::HashMap;
|
|
|
|
/// Return map of <removed_command_name, new_command_name>
|
|
/// This covers simple removed commands nicely, but it's not great for deprecating
|
|
/// subcommands like `foo bar` where `foo` is still a valid command.
|
|
/// For those, it's currently easiest to have a "stub" command that just returns an error.
|
|
pub fn removed_commands() -> HashMap<String, String> {
|
|
[
|
|
("fetch".to_string(), "http get".to_string()),
|
|
("post".to_string(), "http post".to_string()),
|
|
("benchmark".to_string(), "timeit".to_string()),
|
|
]
|
|
.into_iter()
|
|
.collect()
|
|
}
|