I have a list of macros in a variable that matches my list of macros in KM. The order they display in KM matches the order they display in Finder…but that doesn't match what happens with KM's "Sort" filter, nor with the unix sort
command with any of its various sorting options.
A brief example; here's part of my list in Finder/KM:
__ AppWatchAdd 1.2
__ AppWatchDel 1.2
__ AppWatchLauncher 1.2
__ Browse KM Wiki topics
__ Demo- Updater for macros 1.3
__ Macro Usage Counter 2.4
...
app-Terminal
app-Zork
Conversions
Global Macro Group
Help Files Only
Mouse Free Zone
There are any number of ways to sort in KM, but none look anything like that. Here's the built-in sort filter, for example, from the top of its order:
Conversions
Global Macro Group
Help Files Only
Mouse Free Zone
Open From Folder
Open From Folder SLOW ORIGINAL
VPN Connection [Posted]
__ AppWatchAdd 1.2
__ AppWatchDel 1.2
__ AppWatchLauncher 1.2
...
Basically, in Finder and KM, the special characters all come first, then alpha order. The Sort filter in KM uses the same algorithm as the sort
Terminal command (I would guess that's what it uses?). Trying all the options in Terminal with sort
, none of them get close to the above.
Is there any way to sort the list in the same order for both KM/Finder and my variable, short of writing my own sorting macro?
-rob.