diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-03-28 17:01:07 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-03-28 17:01:07 -0700 |
commit | 7d480ff5792b658f5459c039343450f27824f6ee (patch) | |
tree | ea73bc2f5867d3ad07fe65bf6a82ef6abf57c6b9 /share | |
parent | 37140d5e109ef677e011773436ece15d0fdf061b (diff) |
Make __fish_filter_mime not spew if there's no results
Diffstat (limited to 'share')
-rw-r--r-- | share/functions/__fish_filter_mime.fish | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/share/functions/__fish_filter_mime.fish b/share/functions/__fish_filter_mime.fish index 48fd0b96..44879823 100644 --- a/share/functions/__fish_filter_mime.fish +++ b/share/functions/__fish_filter_mime.fish @@ -1,4 +1,3 @@ - # # $argv[1] is a mimetype. The mimetype may contain wildcards. All # following arguments are filenames. Filenames matching the mimetype @@ -10,7 +9,10 @@ function __fish_filter_mime -d "Select files with a specific mimetype" set -l mime_search $argv[1] set -e argv[1] - set -l mime (mimedb -f $argv) + if not set -l mime (mimedb -f $argv) + return 1 + end + set -l res for i in (seq (count $mime)) |