Skip to content

fix: preserve exclusive range operator (..<)#96

Merged
fdncred merged 1 commit intonushell:mainfrom
saschabuehrle:fix/issue-90
Mar 23, 2026
Merged

fix: preserve exclusive range operator (..<)#96
fdncred merged 1 commit intonushell:mainfrom
saschabuehrle:fix/issue-90

Conversation

@saschabuehrle
Copy link
Contributor

Fixes #90

format_range was hardcoding .. for the range operator. Exclusive ranges like 0..<300 got rewritten to 0..300, which changes semantics (300 values vs 301).

Now reads the actual operator from range.operator (which implements Display as either .. or ..<). Added exclusive range cases to the range fixtures.

\u2014 saschabuehrle

@fdncred fdncred merged commit e234366 into nushell:main Mar 23, 2026
5 checks passed
@fdncred
Copy link
Contributor

fdncred commented Mar 23, 2026

Thanks

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.

Exclusive range 0..<N is changed to inclusive 0..N

2 participants