From 35b2633ad941966f5fca07b625a594a5b68c0fdb Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 15 Nov 1999 12:01:46 +0000 Subject: manual/8639 --- Completion/User/_gs | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'Completion/User/_gs') diff --git a/Completion/User/_gs b/Completion/User/_gs index 0c9c11e10..2eebb8d23 100644 --- a/Completion/User/_gs +++ b/Completion/User/_gs @@ -8,10 +8,10 @@ if compset -N --; then return 1 fi else - local context state line ret=1 + local curcontext="$curcontext" state line ret=1 typeset -A opt_args - _x_arguments \ + _x_arguments -C \ '-q[quiet startup]' \ '-g-[set device size]:device size (x):' \ '-r-[set resolution]:resolution ( or x):' \ @@ -25,38 +25,31 @@ 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 \ - WRITESYSTEMDICT && ret=0 + _wanted names expl 'systemdict definition name' && + compadd "$expl[@]" -M 'm:{a-z}={A-Z}' - \ + DISKFONTS NOCACHE NOBIND NODISPLAY NOPAUSE PLATFONTS SAFER \ + WRITESYSTEMDICT && ret=0 fi ;; sname) 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 + _wanted devices 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 + _files "$expl[@]" && ret=0 ;; *) _message 'systemdict value' 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 + _wanted names expl 'systemdict name' && + compadd "$expl[@]" -S\= -M 'm:{a-z}={A-Z}' - DEVICE OutputFile && + ret=0 fi ;; esac -- cgit 1.4.1