when a script is not a script according to krun...
David Faure
faure at kde.org
Tue Mar 30 21:35:13 BST 2004
On Tuesday 30 March 2004 22:26, ian reinhart geiser wrote:
> I guess this is the part that I wanted to avoid. Is there a generic
> "script" mimetype so that we can say "ah this text file is in fact a
> shellscript that someone decided to name starttws"
Yes, application/x-shellscript means it's a shellscript, whether this was found
by the extension or by the content!!
Please stop associating mimetypes with filenames, it's not the only way mimetypes
are found :)
If a file is named starttws but starts with #!/bin/sh, it will be given the
application/x-shellscript already (try it in konq, or use kio/tests/kmimemagictest to see it)
> or do we have to just maintain a list of plausable mimetypes?
No no, no guessing ("I got text/plain but it might be executable") needed.
> Another alternitive, is we
> could add a tag to these script mimetypes identifying them as possible
> things you can run? Similar to "X-KDE-IsAlso=text/plain" only we could
> have "X-KDE-IsAlso=application/x-executable". This could give us a great
> deal of control over this feature, or are there hidden side effects here?
Inheriting from x-executable (or maybe a new intermediary, like application/x-script)
would indeed allow to define new types of scripts without changing the code.
Then we could say that x-python, x-perl and x-kjsembed (not x-javascript, see Harri's comment)
are special types of x-script indeed.
And x-script would inherit text/plain, so no multiple inheritance needed (to answer Waldo's post).
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list