Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update filesize -> filesize math to fix coercion errors #3675

Merged
merged 2 commits into from Jun 23, 2021
Merged

update filesize -> filesize math to fix coercion errors #3675

merged 2 commits into from Jun 23, 2021

Conversation

fdncred
Copy link
Collaborator

@fdncred fdncred commented Jun 23, 2021

This change allows you to do things like this:
ls | first | select name size | insert size2 { ls $it.name | get size } | insert ratio { $it.size / $it.size2 }
or this:
ls | first | select name size | insert size2 { (ls $it.name | get size) + 300 } | insert ratio { $it.size / $it.size2 }
Discussion on Discord about how this works
https://discord.com/channels/601130461678272522/601130461678272524/857291675762950165

@fdncred fdncred merged commit a1aae8c into nushell:main Jun 23, 2021
@fdncred fdncred deleted the fix_filesize_coercion_errors branch June 23, 2021 20:37
palashahuja pushed a commit to palashahuja/nushell that referenced this pull request Jun 26, 2021
* update filesize -> filesize math to fix coercion errors

* maybe shouldn't do some operations with filesize and int?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant