mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 13:47:47 +02:00
Fixing captures (#723)
* WIP fixing captures * small fix * WIP * Rewrite to proof-of-concept better parse_def * Add missing file * Finish capture refactor * Fix tests * Add more tests
This commit is contained in:
@ -112,6 +112,10 @@ impl Expression {
|
||||
Expr::Block(block_id) => {
|
||||
let block = working_set.get_block(*block_id);
|
||||
|
||||
if block.captures.contains(&IN_VARIABLE_ID) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if let Some(Statement::Pipeline(pipeline)) = block.stmts.get(0) {
|
||||
match pipeline.expressions.get(0) {
|
||||
Some(expr) => expr.has_in_variable(working_set),
|
||||
|
Reference in New Issue
Block a user