Sorting special characters

Questions, glitches, bugs and crashes
Post Reply
MrZigi
Posts: 5
Joined: Sun Mar 21, 2021 1:54 pm

Sorting special characters

Post by MrZigi » Sun Mar 21, 2021 2:47 pm

Hello Fellow NC/TC Fans,
after browsing this forum for a while I'd like to ask the question about the sorting of folders/files w/ special characters like: !, ~, _, etc.
I've read threads about underscore that it comes before letters but after numbers. But few other chanracters also sort different than in Finder. Here is the comparison:

Code: Select all

NIMBLE	FINDER	TERMINAL
======================
	_F1
!F1	!F1	!F1
.F1	.F1	.F1
	~F1
1F	1F	1F 
_F1                  
F1	F1	F1
		_F1
~F1		~F1
As long time Windows/TotalCmd user I've been using "dot" to keep certain folders/files on top of the list. However it's reserved for hidden files in OSX so I moved to my 2nd favourite: "tilde". But here I was caught by surprice when switched to Nible and "tilde" falls after alphanumeric. Is there any setting which drives sorting as in TC?
Thanks and best regards,
Zigi

User avatar
mike
Posts: 926
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: Sorting special characters

Post by mike » Wed Mar 24, 2021 11:29 am

Hi, at the moment the order when sorting by name is fixed to be purely lexicographical according to the numeric representation of the characters.
I can though give up at some point and add a global switch to allow using a system-based sort order, like Finder does.

User avatar
mike
Posts: 926
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: Sorting special characters

Post by mike » Wed Mar 24, 2021 11:30 am

That order, however, is not defined at all and is a black box that can be changed by Apple at will:
https://developer.apple.com/documentati ... guage=objc

MrZigi
Posts: 5
Joined: Sun Mar 21, 2021 1:54 pm

Re: Sorting special characters

Post by MrZigi » Sun Mar 28, 2021 4:42 pm

Hello Mike,
I see your point. Nevertheless I think many users would appreciate such switch. If Apple changes the function the option would still be consistent w/ Finder.
Thanks & best regards,
Zigi

Post Reply