Yup, and thus:

[ 3:25 PM][ttys001][/Users/mwilson]

mbp13 $ mdls -name kMDItemContentTypeTree hello.c     

kMDItemContentTypeTree = (

    "public.c-source",

    "public.source-code",

    "public.plain-text",

    "public.text",

    "public.data",

    "public.item",

    "public.content"

)


Should mean that the TW generator would be used, since there is no registration for public.c-source, and TM owns the registration for public.source-code.  But it isn’t.

Or this one:

[ 3:28 PM][ttys002][../AppleScript/BBEdit]

mbp13 $ mdls -name kMDItemContentTypeTree Create\ New\ File.applescript

kMDItemContentTypeTree = (

    "com.apple.applescript.text",

    "public.script",

    "public.source-code",

    "public.plain-text",

    "public.text",

    "public.data",

    "public.item",

    "public.content"

)


Should produce the same result.  But it doesn’t.

--
Marc Wilson
posguy99@gmail.com


On Sun, May 31, 2020, at 1:52 PM, Rob McBroom wrote:

On 31 May 2020, at 12:39, Curt Sellmer wrote:


I was not aware of the qlmanage utility until I saw this email....

I am running MacOS 10.14.6 (Mojave) and when I use QuickLook to view a
source file such as Foo.scala I just get the generic QuickLook window
describing the file.

But if I use this command: qlmanage -p -c public.source-code U.scala

Then I get the correct QuickLook window that uses the TextMate theme.

It seems that the Finder is not associating the "public.source-code" type
with the file. However I have told Finder to open all .scala files with
TextMate and indeed it is listed as the default App for opening the files.
Not sure if there is something else that must be done so that Finder knows
that this is a source code file?


You can always see what UTIs the system thinks a file has by running

mdls -name kMDItemContentTypeTree filename.xyz

I forget what (if any) influence installed apps have on the list, but that’s almost certainly what Finder is using.


--
Rob McBroom



_______________________________________________
TextMate mailing list
TextMate@lists.macromates.com
https://lists.macromates.com/listinfo/textmate