diff --git a/share/functions/__fish_filter_mime.fish b/share/functions/__fish_filter_mime.fish index 48fd0b969..448798234 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))