From 74a22ff4262b872668d9cca3279eece5b7e49350 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Sat, 16 Mar 2019 00:54:44 -0700 Subject: [PATCH] wcsfilecmp: punctuation [\]^_` after A-Z. This tweaks wcsfilecmp such that certain punctuation characters will come after A-Z. A big win with `set ` - the __prefixed fish junk now comes after the stuff users should care about. --- src/util.cpp | 4 ++-- tests/__fish_complete_directories.out | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util.cpp b/src/util.cpp index 5bb89e5ba..4ca1cec54 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -61,8 +61,8 @@ int wcsfilecmp(const wchar_t *a, const wchar_t *b) { if (retval || *a == 0 || *b == 0) break; } - wint_t al = towlower(*a); - wint_t bl = towlower(*b); + wint_t al = towupper(*a); + wint_t bl = towupper(*b); if (al < bl) { retval = -1; break; diff --git a/tests/__fish_complete_directories.out b/tests/__fish_complete_directories.out index a098be2bb..a19636ac4 100644 --- a/tests/__fish_complete_directories.out +++ b/tests/__fish_complete_directories.out @@ -6,6 +6,8 @@ test/data/ Directory # __fish_complete_directories test/data/ test/data/abc/ Directory test/data/abcd/ Directory +test/data/fish-symlink/ Directory +test/data/fish-symlink2/ Directory test/data/fish/ Directory test/data/xy/ Directory test/data/xyz/ Directory