-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Allow _ for readability in unitized constants like 3_day or 5_gb #9111
Copy link
Copy link
Closed
Labels
A:accessibilityAn issue to make Nushell more accessible to anyoneAn issue to make Nushell more accessible to anyonecategory:enhancementNew feature or requestNew feature or request
Milestone
Description
Related problem
〉100_000
100000
〉3.141_596_2828
3.1415962828
But not:
〉3day
3day
〉3_day
Error: nu::shell::external_command
× External command failed
╭─[entry #14:1:1]
1 │ 3_day
· ──┬──
· ╰── executable was not found
╰────
help: No such file or directory (os error 2)
Describe the solution you'd like
So one could say:
let duration = 3.165_hours
let size = 1.234_567__mb
Using _ for improving readability of numeric constants is a great idea. Why not extend it to unitized constants of all types? Duration, Filesize, (what's the complete list of these?)
Describe alternatives you've considered
No response
Additional context and details
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:accessibilityAn issue to make Nushell more accessible to anyoneAn issue to make Nushell more accessible to anyonecategory:enhancementNew feature or requestNew feature or request