mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 10:38:07 +02:00
Rename all?
, any?
and empty?
(#6464)
Rename `all?`, `any?` and `empty?` to `all`, `any` and `is-empty` for sake of simplicity and consistency. - More understandable for newcomers, that these commands are no special to others. - `?` syntax did not really aprove readability. For me it made it worse. - We can reserve `?` syntax for any other nushell feature.
This commit is contained in:
@ -5,11 +5,14 @@ use std::collections::HashMap;
|
||||
/// 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 deprecated_commands() -> HashMap<String, String> {
|
||||
let mut commands = HashMap::new();
|
||||
commands.insert("keep".to_string(), "take".to_string());
|
||||
commands.insert("match".to_string(), "find".to_string());
|
||||
commands.insert("nth".to_string(), "select".to_string());
|
||||
commands.insert("pivot".to_string(), "transpose".to_string());
|
||||
commands.insert("unalias".to_string(), "hide".to_string());
|
||||
commands
|
||||
HashMap::from([
|
||||
("keep".to_string(), "take".to_string()),
|
||||
("match".to_string(), "find".to_string()),
|
||||
("nth".to_string(), "select".to_string()),
|
||||
("pivot".to_string(), "transpose".to_string()),
|
||||
("unalias".to_string(), "hide".to_string()),
|
||||
("all?".to_string(), "all".to_string()),
|
||||
("any?".to_string(), "any".to_string()),
|
||||
("empty?".to_string(), "is-empty".to_string()),
|
||||
])
|
||||
}
|
||||
|
Reference in New Issue
Block a user