Page 1 of 1

Sorting special characters

Posted: Sun Mar 21, 2021 2:47 pm
by MrZigi
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

Re: Sorting special characters

Posted: Wed Mar 24, 2021 11:29 am
by mike
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.

Re: Sorting special characters

Posted: Wed Mar 24, 2021 11:30 am
by mike
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

Re: Sorting special characters

Posted: Sun Mar 28, 2021 4:42 pm
by MrZigi
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