[TxMt] Re: list of all file types for -t
じょいすじょん
dangerwillrobinsondanger at gmail.com
Tue Apr 23 01:35:20 UTC 2019
This should be somewhat rare, but what would be valuable to know is, does it accept UTIs? or file extensions? or some list of names?
> On Apr 23, 2019, at 8:04, Christian Rosentreter <karibu at gmx.net> wrote:
>
>
> Hi there,
>
>> On 23 Apr 2019, at 12:01 AM, Dr Eberhard W Lisse <el at lisse.na> wrote:
>>
>> Yes, and no.
>>
>> I would like to know which (common) ones are possible, or how I can find
>> that (which ones are installed/available) out, so that if I use "mate -"
>> in a pipe I can "load" the required bundle and make use of its
>> facilities without having to resort to selecting filetype with the
>> mouse.
>>
>> Probably something of use to others as well.
>
>
> Maybe use something like this insane one-liner:
>
> find ~/Library/Application\ Support/TextMate/Managed/Bundles -depth 1 -name '*.tmbundle' -exec bash -c 'tput bold; echo -n "$(defaults read "{}/info.plist" name): "; tput sgr0; echo $(if cd "{}/Syntaxes" 2>/dev/null; then for syntax in *.plist *.tmLanguage; do if [ -f "${syntax}" ]; then /usr/libexec/PlistBuddy -c "Print :fileTypes" "${syntax}" 2>/dev/null | grep -v "[\{\}]"; fi; done; fi)' \;
>
>
> Actually, please don't try that. You've been warned! :-) But probably something like this could be done properly in a shell script. Just scan the available bundles and extract the required information directly. I'm not sure what "filetype" the mate command actually wants (maybe using the scopeName from the syntax file would be the right choice?).
>
> Just providing some wild ideas…
>
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> https://lists.macromates.com/listinfo/textmate
More information about the textmate
mailing list