-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
category:enhancementNew feature or requestNew feature or requeststatus:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look
Description
Basics
- I have done a basic search through the issue tracker to find similar or related issues.
- I have made myself familiar with the available features of Nushell for the particular area this enhancement request touches.
Related problem
I'd like to be able to assign the current value of a pipeline to be set to a variable while continuing the pipeline with the same data. I am not sure how this would work with streaming.
Describe the solution you'd like
This would allow for previous values to be used later:
$products
| get price
| math sum
| let subtotal
| apply_taxes
| { subtotal: $subtotal, total: $in }
Describe alternatives you've considered
You could just end the pipeline and start a new one with the value that was just assigned (... | let subtotal; $subtotal | ...) but this seems unnecessary and may prevent streaming.
Additional context and details
This probably wouldn't break any existing code because:
- Pipeline
leta new feature. - Functions generally don't end with a
letstatement while assuming to returnnull. - I don't think people would put a pipe after a pipeline
letwhile expecting to get anullvalue from the assignment. It would make much more sense to start a new pipeline.
Metadata
Metadata
Assignees
Labels
category:enhancementNew feature or requestNew feature or requeststatus:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look