Would it be possible to create a mime type for iptables files? I have a syntax definition file for GEDIT but I need a mime type assigned. Unfortunately, no glob is possible. The syntax file works for iptables-save format config files as well as shell scripts that build firewalls (the file covers syntax that only would appear in a shell script, as well as the iptables-save format). Definition would look something like this (but need magic I think): <?xml version="1.0" encoding="UTF-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="text/x-iptables"> <comment xml:lang="en">iptables configuration file</comment> </mime-type> </mime-info> Any help greatly appreciated.
Do you have a couple of example files? If there's no magic, and no glob, I'm not sure what the point of adding this mime-type is...
Created attachment 6169 [details] Possible x-iptables mime file I've attached x-iptables which implements some crude magic. It tries to recognize both types of firewall definitions, both shell script types and iptables-save format firewalls.
Bugzilla Upgrade Mass Bug Change NEEDSINFO state was removed in Bugzilla 3.x, reopening any bugs previously listed as NEEDSINFO. - benjsc fd.o Wrangler
* freedesktop.org.xml.in: * tests/list: * tests/test.iptables: Add text/x-iptables for iptables scripts, for the benefit of gedit, definition from Ian Laurie <iml@zip.com.au> (Closes: #6652)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.