mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 16:33:37 +01:00
Assign variables when passed as an argument. (#1947)
This commit is contained in:
parent
160191e9f4
commit
48672f8e30
@ -384,18 +384,16 @@ impl WholeStreamCommand for FnFilterCommand {
|
|||||||
|
|
||||||
async fn run(
|
async fn run(
|
||||||
&self,
|
&self,
|
||||||
args: CommandArgs,
|
CommandArgs {
|
||||||
registry: &CommandRegistry,
|
|
||||||
) -> Result<OutputStream, ShellError> {
|
|
||||||
let CommandArgs {
|
|
||||||
host,
|
host,
|
||||||
ctrl_c,
|
ctrl_c,
|
||||||
shell_manager,
|
shell_manager,
|
||||||
call_info,
|
call_info,
|
||||||
mut input,
|
mut input,
|
||||||
..
|
..
|
||||||
} = args;
|
}: CommandArgs,
|
||||||
|
registry: &CommandRegistry,
|
||||||
|
) -> Result<OutputStream, ShellError> {
|
||||||
let host: Arc<parking_lot::Mutex<dyn Host>> = host.clone();
|
let host: Arc<parking_lot::Mutex<dyn Host>> = host.clone();
|
||||||
let registry: CommandRegistry = registry.clone();
|
let registry: CommandRegistry = registry.clone();
|
||||||
let func = self.func;
|
let func = self.func;
|
||||||
|
Loading…
Reference in New Issue
Block a user