mirror of
https://github.com/nushell/nushell.git
synced 2024-11-15 21:14:40 +01:00
simplify command call
This commit is contained in:
parent
b12a265f1e
commit
637e4f6e6d
@ -134,9 +134,11 @@ fn main() -> Result<()> {
|
||||
let engine_state = engine_state.borrow();
|
||||
let output = match engine_state.find_decl("table".as_bytes()) {
|
||||
Some(decl_id) => {
|
||||
let command = engine_state.get_decl(decl_id);
|
||||
|
||||
let table = command.run(&state, &Call::new(), value)?;
|
||||
let table = engine_state.get_decl(decl_id).run(
|
||||
&state,
|
||||
&Call::new(),
|
||||
value,
|
||||
)?;
|
||||
table.into_string()
|
||||
}
|
||||
None => value.into_string(),
|
||||
|
Loading…
Reference in New Issue
Block a user