about summary refs log tree commit diff
path: root/Completion/User/_gs
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User/_gs')
-rw-r--r--Completion/User/_gs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Completion/User/_gs b/Completion/User/_gs
index 55dc4f8f7..0c9c11e10 100644
--- a/Completion/User/_gs
+++ b/Completion/User/_gs
@@ -8,7 +8,7 @@ if compset -N --; then
     return 1
   fi
 else
-  local state line ret=1
+  local context state line ret=1
   typeset -A opt_args
 
   _x_arguments \
@@ -25,6 +25,8 @@ else
     if [[ "$PREFIX" = *\=* ]]; then
       _message 'systemdict definition value'
     else
+      _tags "$context" names || return 1
+
       _description expl 'systemdict definition name'
       compadd "$expl[@]" -M 'm:{a-z}={A-Z}' - \
               DISKFONTS NOCACHE NOBIND NODISPLAY NOPAUSE PLATFONTS SAFER \
@@ -35,10 +37,14 @@ else
     if compset -P '*\='; then
       case "$IPREFIX" in
       *DEVICE\=)
+        _tags "$context" devices || return 1
+
         _description expl 'ghostscript device'
         compadd "$expl[@]" - "${(@)${=${$(gs -h)##* devices:}%%Search path:*}:#}" && ret=0
         ;;
       *OutputFile\=)
+        _tags "$context" files || return 1
+
         _description expl 'output file'
         _files && ret=0
         ;;
@@ -47,6 +53,8 @@ else
         return 1
       esac
     else
+      _tags "$context" names || return 1
+
       _description expl 'systemdict name'
       compadd "$expl[@]" -S\= -M 'm:{a-z}={A-Z}' - DEVICE OutputFile && ret=0
     fi