Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 10th, 2011  |  syntax: Diff  |  size: 0.79 KB  |  views: 82  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. --- ori/xdg-open        2011-03-11 07:46:26.736084304 +0800
  2. +++ changed/xdg-open    2011-03-11 07:46:17.742062663 +0800
  3. @@ -424,6 +424,14 @@
  4.          fi
  5.          check_input_file "$file"
  6.  
  7. +        # mimeo can handle files
  8. +        if mimeo -h 2>/dev/null 1>&2; then
  9. +            mimeo "$file"
  10. +            if [ $? -eq 0 ]; then
  11. +                exit_success
  12. +            fi
  13. +        fi
  14. +
  15.          open_generic_xdg_mime "$file"
  16.  
  17.          if [ -f /etc/debian_version ] &&
  18. @@ -442,6 +450,14 @@
  19.          fi
  20.      fi
  21.  
  22. +    # mimeo can handle other links as well
  23. +    if mimeo -h 2>/dev/null 1>&2; then
  24. +        mimeo "$1"
  25. +        if [ $? -eq 0 ]; then
  26. +            exit_success
  27. +        fi
  28. +    fi
  29. +
  30.      IFS=":"
  31.      for browser in $BROWSER; do
  32.          if [ x"$browser" != x"" ]; then
clone this paste RAW Paste Data