about summary refs log tree commit diff
path: root/Completion/Unix/Command/_links
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-12-04 14:23:29 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-12-04 14:23:29 +0000
commit966afb4622fbb5a71583557af88425b693e06fce (patch)
tree4df4fdd862875d2f877ad531fab9ef167c3675c4 /Completion/Unix/Command/_links
parent825c0ad82faa2b2119bd5305f90413b252093a8d (diff)
downloadzsh-966afb4622fbb5a71583557af88425b693e06fce.tar.gz
zsh-966afb4622fbb5a71583557af88425b693e06fce.tar.xz
zsh-966afb4622fbb5a71583557af88425b693e06fce.zip
Baptiste Daroussin: 19272: small updates
Diffstat (limited to 'Completion/Unix/Command/_links')
-rw-r--r--Completion/Unix/Command/_links16
1 files changed, 11 insertions, 5 deletions
diff --git a/Completion/Unix/Command/_links b/Completion/Unix/Command/_links
index 7d8a83a23..47869ad6a 100644
--- a/Completion/Unix/Command/_links
+++ b/Completion/Unix/Command/_links
@@ -8,7 +8,7 @@ _arguments -C \
   '(-help)-assume-codepage[use the given codepage when the webpage did not specify its]:codepage:' \
   '(-help)-async-dns[asynchronous DNS resolver]:bool:((0\:on 1\:off))' \
   '(-help)-download-dir[default download directory]:_files -/' \
-  '(-help)-driver[graphics driver to use]:driver:(x svgalib fb pmshell atheos)' \
+  '(-help)-driver[graphics driver to use]:graphics driver:->graphics_drivers' \
   '(-help)-dump[dump the page as pure text]' \
   '(-help)-format-cache-size[number of formatted document pages cached]:pages:' \
   '(-help)-ftp-proxy[host and port number of the FTP proxy, or blank]:hostport:_hosts' \
@@ -26,9 +26,15 @@ _arguments -C \
   '(-help)-unrestartable-receive-timeout[timeout on non restartable connections]:secs:' \
   '(-help)-version[prints the links version number and exit]' \
   ':url:->html' && ret=0
-  
-if [[ "$state" = html ]]; then
-  _alternative 'files:file:_files -g "*.x#html"' 'urls:url:_urls' && ret=0
-fi
+
+case $state in
+  html)
+    _alternative 'files:file:_files -g "*.x#html"' 'urls:url:_urls' && ret=0
+  ;;
+  graphics_drivers)
+    vals=(${=${${${(f)"$(_call_program links-graphics-drivers links -driver help 2>&1)"}[-1]}//','/''}} )
+    _describe -t links-graphics-drivers 'graphics driver' vals && ret=0
+  ;;
+esac
 
 return ret