Proper mime-type of shell scripts in subversion

mime-types, shell, svn

Solution

The `file` utility uses `text/x-shellscript' for shell scripts:

$ file --mime-type /tmp/test.sh
/tmp/test.sh: text/x-shellscript

Problem

When I add a shell script (foo.sh) to subversion, by default it sets the `svn:mime-type` to `application/x-shellscript`. Since this does not start with `text/`, diff and blame essentially ignore the file. I looked at the official list of text mime-types but did not see anything that looked like a shell script. Is there a good value to set it to? Update Following the advice below, I set the mime-type to text/x-shellscript. However, blame still thinks that it is a binary file. ``` $ svn blame file.sh Skipping binary file: 'file.sh' $ svn proplist file.sh Properties on 'file.sh': svn:executable svn:mime-type $ svn propget svn:mime-type file.sh text/x-shellscript ``` Is there something else that I need to do to convince subversion that it is a text file?

Original source