mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Aliases (#1589)
* WIP getting scopes right * finish adding initial support * Finish with alias and add startup commands
This commit is contained in:
17
crates/nu-cli/tests/commands/alias.rs
Normal file
17
crates/nu-cli/tests/commands/alias.rs
Normal file
@ -0,0 +1,17 @@
|
||||
use nu_test_support::nu;
|
||||
use nu_test_support::playground::Playground;
|
||||
|
||||
#[test]
|
||||
fn alias_args_work() {
|
||||
Playground::setup("append_test_1", |dirs, _| {
|
||||
let actual = nu!(
|
||||
cwd: dirs.root(),
|
||||
r#"
|
||||
alias double_echo [a b] {echo $a $b}
|
||||
double_echo 1 2 | to-json
|
||||
"#
|
||||
);
|
||||
|
||||
assert_eq!(actual, "[1,2]");
|
||||
})
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
mod alias;
|
||||
mod append;
|
||||
mod calc;
|
||||
mod cd;
|
||||
|
Reference in New Issue
Block a user