1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

sort: correctly inherit global flags for keys (#2302)

Closes #2254. We should only inherit global settings for keys when there
are absolutely no options attached to the key.

The default key (matching the whole line) is implicitly added only if no
keys are supplied.

Improved some error messages by including more context.
This commit is contained in:
Michael Debertol 2021-05-29 23:25:56 +02:00 committed by GitHub
parent d821719c67
commit dc63133f14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 331 additions and 129 deletions

5
tests/fixtures/sort/blanks.expected vendored Normal file
View file

@ -0,0 +1,5 @@
a
b
x
x
z

View file

@ -0,0 +1,15 @@
a
_
___
b
_
_
x
_
__________
x
_
___
z
_
__

5
tests/fixtures/sort/blanks.txt vendored Normal file
View file

@ -0,0 +1,5 @@
b
a
z
x
x

View file

@ -0,0 +1,2 @@
1a
1A

View file

@ -0,0 +1,6 @@
1a
_
___
1A
_
__

View file

@ -0,0 +1,2 @@
1a
1A