nu_command/removed/
removed_commands.rs

1use std::collections::HashMap;
2
3/// Return map of <removed_command_name, new_command_name>
4/// This covers simple removed commands nicely, but it's not great for deprecating
5/// subcommands like `foo bar` where `foo` is still a valid command.
6/// For those, it's currently easiest to have a "stub" command that just returns an error.
7pub fn removed_commands() -> HashMap<String, String> {
8    [
9        ("fetch".to_string(), "http get".to_string()),
10        ("post".to_string(), "http post".to_string()),
11        ("benchmark".to_string(), "timeit".to_string()),
12    ]
13    .into_iter()
14    .collect()
15}