diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-08-30 10:08:37 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-08-30 10:08:37 +0000 |
commit | c8236cdb4906e9e3acc3bd160f810f50fc5d985e (patch) | |
tree | 65b430b26ef7e491c73788c1790cf95661ff6342 /Completion/User | |
parent | d335ab27a7b0a6926e9d211ca22fd1f065fd258a (diff) | |
download | zsh-c8236cdb4906e9e3acc3bd160f810f50fc5d985e.tar.gz zsh-c8236cdb4906e9e3acc3bd160f810f50fc5d985e.tar.xz zsh-c8236cdb4906e9e3acc3bd160f810f50fc5d985e.zip |
Initial revision
Diffstat (limited to 'Completion/User')
-rw-r--r-- | Completion/User/_gs | 19 | ||||
-rw-r--r-- | Completion/User/_gs_name | 31 |
2 files changed, 50 insertions, 0 deletions
diff --git a/Completion/User/_gs b/Completion/User/_gs new file mode 100644 index 000000000..8ecd99570 --- /dev/null +++ b/Completion/User/_gs @@ -0,0 +1,19 @@ +#compdef gs ghostscript + +if compset -N --; then + if [[ CURRENT -eq 1 ]]; then + _ps + else + _message 'userdict ARGUMENTS' + return 1 + fi +else + _x_options \ + -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' +fi diff --git a/Completion/User/_gs_name b/Completion/User/_gs_name new file mode 100644 index 000000000..3aef646eb --- /dev/null +++ b/Completion/User/_gs_name @@ -0,0 +1,31 @@ +#autoload + +local expl + +if [[ "$1" = -d ]]; then + 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 + fi +elif compset -P '*\='; then + case "$IPREFIX" in + *DEVICE\=) + _description expl 'ghostscript device' + compadd "$expl[@]" - "${(@)${=${$(gs -h)##* devices:}%%Search path:*}:#}" + ;; + *OutputFile\=) + _description expl 'output file' + _files + ;; + *) + _message 'systemdict value' + return 1 + esac +else + _description expl 'systemdict name' + compadd "$expl[@]" -S\= -M 'm:{a-z}={A-Z}' - DEVICE OutputFile +fi |