diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-07 12:54:47 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-07 12:54:47 +0000 |
commit | 6cc1204ea97b3c02da1b3d2a4df93712f0c5fefb (patch) | |
tree | a6d4da4a9a1342461ad90d298b64b04b3bc67f8d /Completion/User/_gs | |
parent | 77f9967f32aa39ea0290162e0c3921a0ebca394e (diff) | |
download | zsh-6cc1204ea97b3c02da1b3d2a4df93712f0c5fefb.tar.gz zsh-6cc1204ea97b3c02da1b3d2a4df93712f0c5fefb.tar.xz zsh-6cc1204ea97b3c02da1b3d2a4df93712f0c5fefb.zip |
zsh-workers/7690
Diffstat (limited to 'Completion/User/_gs')
-rw-r--r-- | Completion/User/_gs | 52 |
1 files changed, 45 insertions, 7 deletions
diff --git a/Completion/User/_gs b/Completion/User/_gs index a216e6325..7e86981e9 100644 --- a/Completion/User/_gs +++ b/Completion/User/_gs @@ -8,12 +8,50 @@ if compset -N --; then return 1 fi else + local state line ret=1 + typeset -A options + _x_arguments \ - -q \ - '-g-:device size (<width>x<height>):' \ - '-r-:resolution (<val> or <x>x<y>):' \ - '-I:search paths:_dir_list' \ - \*-{d,D}'-:def: _gs_name -d' \ - \*-{s,S}'-:def: _gs_name -s' \ - '*:PostScript file:_ps' + '-q[quiet startup]' \ + '-g-[set device size]:device size (<width>x<height>):' \ + '-r-[set resolution]:resolution (<val> or <x>x<y>):' \ + '-I[add search paths]:search paths:_dir_list' \ + \*-{d,D}'-[define name with definition]:def:->dname' \ + \*-{s,S}'-[define name with value]:def:->sname' \ + '*:PostScript file:_ps' && ret=0 + + case "$state" in + dname) + if [[ "$PREFIX" = *\=* ]]; then + _message 'systemdict definition value' + else + _description 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\=) + _description expl 'ghostscript device' + compadd "$expl[@]" - "${(@)${=${$(gs -h)##* devices:}%%Search path:*}:#}" && ret=0 + ;; + *OutputFile\=) + _description expl 'output file' + _files && ret=0 + ;; + *) + _message 'systemdict value' + return 1 + esac + else + _description expl 'systemdict name' + compadd "$expl[@]" -S\= -M 'm:{a-z}={A-Z}' - DEVICE OutputFile && ret=0 + fi + ;; + esac + + return ret fi |