diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-02-17 12:56:56 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-02-17 12:56:56 -0800 |
commit | 8b40f09e17772fddcd35a4f18f6650ddb4f05ea4 (patch) | |
tree | 8e5276a848e23495631b800f484a1bdec5f83b74 /share | |
parent | 93dfb6f7d67e362098482853f794220e0ad3af77 (diff) |
Add function wrapper for mimedb
Diffstat (limited to 'share')
-rw-r--r-- | share/functions/mimedb.fish | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/share/functions/mimedb.fish b/share/functions/mimedb.fish new file mode 100644 index 00000000..3ed24c22 --- /dev/null +++ b/share/functions/mimedb.fish @@ -0,0 +1,12 @@ +# Wrap mimedb in a function so it does not have to be found in PATH +# But only if it's installed +if test -x $__fish_bin_dir/mimedb + eval "function mimedb --description 'Look up file information via the mimedb database' + \"$__fish_bin_dir/mimedb\" \$argv + end" +else + function mimedb --description 'Look up file information via the mimedb database' + # Create a function that simply fails, because mimedb not installed + return 1 + end +end |