mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
wcsfilecmp: be clearer about sorting "-" after letters
This commit is contained in:
parent
c848787107
commit
b5cf9e52ca
1 changed files with 3 additions and 2 deletions
|
@ -62,8 +62,9 @@ int wcsfilecmp(const wchar_t *a, const wchar_t *b) {
|
|||
|
||||
wint_t al = towupper(*a);
|
||||
wint_t bl = towupper(*b);
|
||||
if (al == L'-') al += 48;
|
||||
if (bl == L'-') bl += 48;
|
||||
// Sort dashes after Z - see #5634
|
||||
if (al == L'-') al = L'[';
|
||||
if (bl == L'-') bl = L'[';
|
||||
|
||||
if (al < bl) {
|
||||
retval = -1;
|
||||
|
|
Loading…
Reference in a new issue