moretension / duti

A command-line tool to select default applications for document types and URL schemes on Mac OS X
Other
1.41k stars 66 forks source link

new options to dump declaration for an extension or UTI #2

Closed nivekkagicom closed 10 years ago

nivekkagicom commented 11 years ago

I've added a couple of options to duti to display the UTI declaration(s) for either an extension (-e) or UTI (-u). I hope they might be of worth to others.

The output is as follows:

# duti -e csv
identifier: public.comma-separated-values-text
description: comma-separated values
declaration: {
    UTTypeIdentifier = public.comma-separated-values-text
    UTTypeTagSpecification = {
        public.mime-type = [
            text/csv
            text/comma-separated-values
        ]
        public.filename-extension = [
            csv
        ]
    }
    UTTypeConformsTo = [
        public.delimited-values-text
    ]
    UTTypeReferenceURL = http://www.ietf.org/rfc/rfc4180.txt
    UTTypeDescription = comma-separated values
}
# duti -u public.delimited-values-text
description: delimited text values
declaration: {
    UTTypeDescription = delimited text values
    UTTypeConformsTo = [
        public.text
    ]
    UTTypeIdentifier = public.delimited-values-text
}
moretension commented 10 years ago

Thanks for the contribution!