Skip to content

Conversation

programmerjake
Copy link

@programmerjake programmerjake commented Aug 5, 2025

The new --group-cases-together option groups lines that differ only in case together, so e.g.:

c
b
a
B

is sorted to:

a
B
b
c

instead of:

B
a
b
c

It also works with --unique.

The --ignore-case option keeps lines that differ only in case in the original sorted order, whereas the new option will sort them (and remove duplicates if you pass --unique).

I added a new option instead of changing --ignore-case for backward compatibility with existing commit hooks so it doesn't break CI.

better naming suggestions are welcome.

@programmerjake programmerjake force-pushed the test-me-add-group-cases-together branch from 571c8d1 to 1d6bd5f Compare August 5, 2025 03:30
@asottile
Copy link
Member

asottile commented Aug 5, 2025

please discuss features first before spending time on them

I'm not really looking to add more options especially when I can't possibly think of a name for them or explain in simple terms how they work so I'm going to decline this sorry

@asottile asottile closed this Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants