about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xCompletion/Unix/Type/_mime_types4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 29039ffd1..4c64256a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-01  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* Mark Oteiza: 33081: Completion/Unix/Type/_mime_types: suppress
+	error message if unnecessary file not found.
+
 2014-08-31  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* unposted: Test/A05execution.ztst: further tweaking of the
diff --git a/Completion/Unix/Type/_mime_types b/Completion/Unix/Type/_mime_types
index b8ed889b8..18a332e09 100755
--- a/Completion/Unix/Type/_mime_types
+++ b/Completion/Unix/Type/_mime_types
@@ -33,10 +33,10 @@ if [[ $PREFIX = (#b)([^/]##)/* ]]; then
   compset -p $(( ${#maintype} + 1 ))
   _wanted mime-subtypes expl 'MIME subtype' \
       compadd -- $(sed -ne "s%^\(type=\|\)${maintype}/\([^ 	]*\).*$%\2%p" \
-      $type_files)
+      $type_files 2>/dev/null)
 else
   # Search for main type.
   _wanted mime-types expl 'MIME type' \
     compadd -S/ -- $(sed -ne "s/^type=//" \
-      -e "s%^\(${PREFIX:-[a-z]}[^=\"]*\)/.*$%\1%p" $type_files)
+      -e "s%^\(${PREFIX:-[a-z]}[^=\"]*\)/.*$%\1%p" $type_files 2>/dev/null)
 fi