[ 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"
)
[ 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"
)
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 asource file such as Foo.scala I just get the generic QuickLook windowdescribing the file.But if I use this command: qlmanage -p -c public.source-code U.scalaThen I get the correct QuickLook window that uses the TextMate theme.It seems that the Finder is not associating the "public.source-code" typewith the file. However I have told Finder to open all .scala files withTextMate 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 knowsthat 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