Skip to content

fix range semantic in detect_columns, str substring, str index-of#12894

Merged
kubouch merged 1 commit intonushell:mainfrom
WindSoilder:command_range
May 22, 2024
Merged

fix range semantic in detect_columns, str substring, str index-of#12894
kubouch merged 1 commit intonushell:mainfrom
WindSoilder:command_range

Conversation

@WindSoilder
Copy link
Copy Markdown
Contributor

Description

Fixes: #7761

It's still unsure if we want to change the range semantic itself, but it's good to keep range semantic consistent between nushell commands.

User-Facing Changes

Before

 "abc" | str substring 1..=2
b

After

 "abc" | str substring 1..=2
bc

Tests + Formatting

Adjust tests to fit new behavior

@sholderbach sholderbach added notes:breaking-changes This PR implies a change affecting users and has to be noted in the release notes deprecated:pr-commands (deprecated: too vague) This PR changes our commands in some way labels May 19, 2024
@kubouch
Copy link
Copy Markdown
Contributor

kubouch commented May 22, 2024

Seems good. Let's land this and we can discuss the range semantics further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecated:pr-commands (deprecated: too vague) This PR changes our commands in some way notes:breaking-changes This PR implies a change affecting users and has to be noted in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ranges and str substring are inconsistent (off by 1)

4 participants