[Portland] [PATCH] Add support for mimeo as backend

Cedric Staniewski cedric at gmx.ca
Mon Feb 7 04:07:30 PST 2011


mimeo[1] is a tool written in python that uses MIMEtype file
associations to determine which application should be used to open a
file. Besides, it is possible to use regular expressions to associate
files with programs.

[1] http://xyne.archlinux.ca/projects/mimeo/
---
A nice tool developed by someone from the arch community. I switched to it from
mimeopen because mimeopen did not work well with non-ascii characters in file
names for me.

Hope this list is the right place for patches.

Cedric

scripts/xdg-open |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/scripts/xdg-open b/scripts/xdg-open
index fee4204..305871e 100755
--- a/scripts/xdg-open
+++ b/scripts/xdg-open
@@ -427,6 +427,13 @@ open_generic()
 
         open_generic_xdg_mime "$file"
 
+        if mimeo -h 2>/dev/null 1>&2; then
+            mimeo "$1"
+            if [ $? -eq 0 ]; then
+                exit_success
+            fi
+        fi
+
         if [ -f /etc/debian_version ] &&
             which run-mailcap 2>/dev/null 1>&2; then
             run-mailcap --action=view "$file"
-- 
1.7.4



More information about the Portland mailing list