mirror of
https://github.com/nushell/nushell.git
synced 2025-04-13 07:48:19 +02: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 engine_state = engine_state.borrow();
|
||||||
let output = match engine_state.find_decl("table".as_bytes()) {
|
let output = match engine_state.find_decl("table".as_bytes()) {
|
||||||
Some(decl_id) => {
|
Some(decl_id) => {
|
||||||
let command = engine_state.get_decl(decl_id);
|
let table = engine_state.get_decl(decl_id).run(
|
||||||
|
&state,
|
||||||
let table = command.run(&state, &Call::new(), value)?;
|
&Call::new(),
|
||||||
|
value,
|
||||||
|
)?;
|
||||||
table.into_string()
|
table.into_string()
|
||||||
}
|
}
|
||||||
None => value.into_string(),
|
None => value.into_string(),
|
||||||
|
Loading…
Reference in New Issue
Block a user