Skip to content

fix: don't use exclusive range operator before step#208

Merged
fdncred merged 2 commits into
nushell:mainfrom
Mrfiregem:exlusive-step-range
Jul 20, 2026
Merged

fix: don't use exclusive range operator before step#208
fdncred merged 2 commits into
nushell:mainfrom
Mrfiregem:exlusive-step-range

Conversation

@Mrfiregem

Copy link
Copy Markdown
Contributor

Description of changes

Exclusive range literals with a step provided would format to invalid nu code, eg:

' 0..1..<3 ' | nufmt --stdin # => '0..<1..<3'

This corrects that behavior so now the exclusive range operator is only used for the end value:

' 0..1..<3 ' | nufmt --stdin # => '0..1..<3'

Relevant Issues

closes #207

@fdncred

fdncred commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

looks like ci is red

@Mrfiregem

Copy link
Copy Markdown
Contributor Author

Forgot to run clippy, everything looks good locally now 👍

@fdncred
fdncred merged commit fe206cf into nushell:main Jul 20, 2026
5 checks passed
@fdncred

fdncred commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Thanks for working on this

@Mrfiregem
Mrfiregem deleted the exlusive-step-range branch July 20, 2026 11:54
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 with step formatted incorrectly

2 participants