about summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_cpio4
-rw-r--r--Completion/Unix/Command/_fsh4
-rw-r--r--Completion/Unix/Command/_ifconfig4
-rw-r--r--Completion/Unix/Command/_java18
-rw-r--r--Completion/Unix/Command/_lynx14
-rwxr-xr-xCompletion/Unix/Command/_modutils4
-rw-r--r--Completion/Unix/Command/_mount5
-rw-r--r--Completion/Unix/Command/_ssh8
-rw-r--r--Completion/Unix/Command/_telnet2
-rw-r--r--Completion/Unix/Command/_user_admin2
-rw-r--r--Completion/Unix/Command/_w3m2
-rw-r--r--Completion/Unix/Type/.distfiles2
-rw-r--r--Completion/Unix/Type/_terminals8
13 files changed, 45 insertions, 32 deletions
diff --git a/Completion/Unix/Command/_cpio b/Completion/Unix/Command/_cpio
index 4cccbe609..61c4d76ac 100644
--- a/Completion/Unix/Command/_cpio
+++ b/Completion/Unix/Command/_cpio
@@ -2,7 +2,7 @@
 
 (( $+_is_gnu )) || typeset -gA _is_gnu
 
-local cmd=$service args ig context curcontext="$curcontext" state line opt_args
+local cmd=$service args ig curcontext="$curcontext" state line
 local expl ret
 local fmts='(bar bin odc newc crc tar ustar hpbin hpodc)'
 
@@ -114,7 +114,7 @@ else
 fi 
 
 ret=1
-_arguments -s "$args[@]" && ret=0
+_arguments -C -s "$args[@]" && ret=0
 
 if [[ $state = afile ]]; then
   if compset -P '*:'; then
diff --git a/Completion/Unix/Command/_fsh b/Completion/Unix/Command/_fsh
index a7cc22e6a..a3ca0321a 100644
--- a/Completion/Unix/Command/_fsh
+++ b/Completion/Unix/Command/_fsh
@@ -1,6 +1,8 @@
 #compdef fsh
 
-_arguments \
+local curcontext="$curcontext" state line
+
+_arguments -C \
 	'(--help)-h[help]' \
 	'(-h)--help' \
 	'(--version)-V[version]' \
diff --git a/Completion/Unix/Command/_ifconfig b/Completion/Unix/Command/_ifconfig
index efd6e7707..977f99221 100644
--- a/Completion/Unix/Command/_ifconfig
+++ b/Completion/Unix/Command/_ifconfig
@@ -1,6 +1,6 @@
 #compdef ifconfig
 
-local context state line ret=1
+local curcontext="$curcontext" state line ret=1
 local -a opts args alias debug updownlist
 
 alias=( '(-alias alias)'{,-}'alias[remove or establish alternate address for if]' )
@@ -63,7 +63,7 @@ case $OSTYPE in
   ;;
 esac
 
-_arguments "$args[@]" \
+_arguments -C "$args[@]" \
   '-a[apply to all interfaces]' \
   '1:network interface:_net_interfaces' \
   '::address family:(atalk ether inet inet6 ax25 ddp ipx netrom)' \
diff --git a/Completion/Unix/Command/_java b/Completion/Unix/Command/_java
index 22003bc26..b7b012894 100644
--- a/Completion/Unix/Command/_java
+++ b/Completion/Unix/Command/_java
@@ -8,7 +8,7 @@ jdb_args=()
 
 case "$service" in
 javac)
-  _arguments \
+  _arguments -C \
     '-g-[generate debugging information]:debug:->debug' \
     '-O[optimize]' \
     '-nowarn[suppress warnings]' \
@@ -32,7 +32,7 @@ jdb)
   ;&
 
 java)
-  _arguments \
+  _arguments -C \
     "$jdb_args[@]" \
     '(-cp)-classpath[specify path for user class files]:class path:->classpath' \
     '(-classpath)-cp[specify path for user class files]:class path:->classpath' \
@@ -50,7 +50,7 @@ java)
   ;;
 
 javadoc)
-  _arguments \
+  _arguments -C \
     '-overview[specify overview file]:_files' \
     '-public[display public classes and members only]' \
     '-protected[display public/protected classes and members only (default)]' \
@@ -94,7 +94,7 @@ javadoc)
   ;;
 
 appletviewer)
-  _arguments \
+  _arguments -C \
     '-debug[run applet on jdb]' \
     '-encoding[specify character encoding for source files]:encoding:->encoding' \
     '-J-[specify java option]:java option:' \
@@ -120,7 +120,7 @@ jar)
       m ':manifest file:_files'
       f ':archive file:_files -g \*.\(jar\|zip\)'
     )
-    _arguments \
+    _arguments -C \
       "${jar_cmd/[^-]*/:dummy:}" \
       ${${(s::)jar_cmd}/(#b)(?)/$tmpassoc[$match[1]]} \
       '*:file:->jararg' && return 0
@@ -128,7 +128,7 @@ jar)
   ;;
 
 javah|javah_g)
-  _arguments \
+  _arguments -C \
     '-o[specify output file]:output file:_files' \
     '-d[specify destination directory]:directory:_files -/' \
     '-stubs[generate stubs]' \
@@ -144,7 +144,7 @@ javah|javah_g)
   ;;
 
 javap)
-  _arguments \
+  _arguments -C \
     '-help[print help message]' \
     '-l[line and local variable tables]' \
     '-b[backward compatible to JDK1.1]' \
@@ -169,7 +169,7 @@ extcheck)
   ;;
 
 rmic)
-  _arguments \
+  _arguments -C \
     '-classpath[specify path for user class files]:class path:->classpath' \
     '-d[specify destination directory]:directory:_files -/' \
     '-depend[treat dependencies]' \
@@ -207,7 +207,7 @@ serialvar)
   ;;
 
 native2ascii)
-  _arguments \
+  _arguments -C \
     '-reverse[convert Latin-1 (with \udddd) to native encoding]' \
     '-encoding[specify character encoding]:encoding:->encoding' \
     ':input file:_files' \
diff --git a/Completion/Unix/Command/_lynx b/Completion/Unix/Command/_lynx
index c87563047..b6e6fe47c 100644
--- a/Completion/Unix/Command/_lynx
+++ b/Completion/Unix/Command/_lynx
@@ -14,20 +14,20 @@ _arguments -C \
   '-blink' \
   '-book' \
   '-buried_news' \
-  '-cache=:NUMBER:' \
+  '-cache=:number of documents:' \
   '-case' \
-  '-cfg=:FILENAME:_files' \
+  '-cfg=:configuration file:_files' \
   '-child' \
   '-color' \
   '-cookies' \
   '-core' \
   '-crawl' \
-  '-display=:DISPLAY:_x_display' \
+  '-display=:display:_x_display' \
   '-dump' \
-  '-editor=:EDITOR:_files' \
+  '-editor=:editor:_command_names -e' \
   '-emacskeys' \
   '-enable_scrollback' \
-  '-error_file=:FILENAME:_files' \
+  '-error_file=:error file:_files' \
   '-fileversions' \
   '-force_html' \
   '-force_secure' \
@@ -41,7 +41,7 @@ _arguments -C \
   '-image_links' \
   '-ismap' \
   '-index=:URL:->html' \
-  '-link=:NUMBER:' \
+  '-link=:starting count:' \
   '-localhost' \
   '-locexec' \
   '-mime_header' \
@@ -83,7 +83,7 @@ _arguments -C \
   '-startfile_ok' \
   '-tagsoup' \
   '-telnet' \
-  '-term=:TERM:' \
+  '-term=:terminal name:_terminals' \
   '-tlog' \
   '-trace' \
   '-traversal' \
diff --git a/Completion/Unix/Command/_modutils b/Completion/Unix/Command/_modutils
index 481b8b289..1b47e8a3d 100755
--- a/Completion/Unix/Command/_modutils
+++ b/Completion/Unix/Command/_modutils
@@ -1,6 +1,6 @@
 #compdef modprobe rmmod
 
-local expl loaded
+local curcontext="$curcontext" state line expl loaded
 
 _modutils_loaded_modules() {
 
@@ -62,7 +62,7 @@ case "$service" in
              '(-C)--config:config file:_files'
   )
 
-  _arguments '(--remove)-r[remove]:*:loaded module:->modprobe_remove' \
+  _arguments -C '(--remove)-r[remove]:*:loaded module:->modprobe_remove' \
              '(-r)--remove:*:loaded module:->modprobe_remove' \
              '(--list)-l[list matching modules]:*:module file:->modprobe_list' \
              '(-l)--list:*:module file:->modprobe_list' \
diff --git a/Completion/Unix/Command/_mount b/Completion/Unix/Command/_mount
index 1388dba04..f8bab52e8 100644
--- a/Completion/Unix/Command/_mount
+++ b/Completion/Unix/Command/_mount
@@ -50,7 +50,7 @@ fi
 # are below these table.
 
 local curcontext="$curcontext" state line suf ret=1
-local args fss deffs=iso9660 descr tmp typeops=-t _nfs_access _nfs_ufs
+local args deffs=iso9660 tmp typeops=-t _nfs_access _nfs_ufs
 
 typeset -A opt_args
 
@@ -177,7 +177,7 @@ if (( ! $+_fs_any )); then
       '(susp)nosusp[disable system use sharing protocol]'
       '(norrip)rrip[enable rock ridge extensions]'
       '(rrip)norrip[disable rock ridge extensions]'
-      'nmconv[specify filename translation]:filename translation:(c l m)'
+      'nmconv[specify filename translation]:filename translation:((c\:no\ translation l\:to\ lowercase m\:suppress\ version\ no))'
     )
       
     _fs_nfs=(
@@ -537,7 +537,6 @@ if [[ "$service" = mount ]]; then
       '-M[use alternate mtab]:alternate mtab:_files'
       '-P[with -p, prepend prefix to paths]:prefix'
     )
-    fss=( efs proc fd nfs iso9660 dos hfs cachefs )
     deffs=efs
     ;;
   linux*)
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index 40664114c..7d1d95d7c 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -5,8 +5,12 @@ _remote_files () {
   # colorings and LIST_TYPES and so on, but I'm just not that ambitious.
   local expl
 
-  _wanted files expl 'remote files' \
-      compadd $(ssh -a -x ${words[CURRENT]%:*} echo ${words[CURRENT]#*:}\*)
+  if zstyle -T ":completion:${curcontext}:" remote-access; then
+    _wanted files expl 'remote files' \
+        compadd $(ssh -a -x ${words[CURRENT]%:*} echo ${words[CURRENT]#*:}\*)
+  else
+    _message 'remote files'
+  fi
 }
 
 _ssh () {
diff --git a/Completion/Unix/Command/_telnet b/Completion/Unix/Command/_telnet
index fc8b6a44e..4ff6ed2a7 100644
--- a/Completion/Unix/Command/_telnet
+++ b/Completion/Unix/Command/_telnet
@@ -9,7 +9,7 @@ local curcontext="$curcontext" state line expl
 typeset -A opt_args
 
 if (( ! $+_telnet_args )); then
-  local help="$(_call_program options telnet -\? < /dev/null 2>&1)"
+  local help="$(_call_program options 'telnet -\?' < /dev/null 2>&1)"
   local -A optionmap
   optionmap=(
     '*\[-8\]*' '-8[allow 8-Bit data]'
diff --git a/Completion/Unix/Command/_user_admin b/Completion/Unix/Command/_user_admin
index bf0908372..f56b20d37 100644
--- a/Completion/Unix/Command/_user_admin
+++ b/Completion/Unix/Command/_user_admin
@@ -15,7 +15,7 @@ if [[ $service = user* ]]; then
   args=(
     '(-D)-c+[comment]:comment'
     "(-D)-${home}+[home directory]:home directory:_directories -W /"
-    '(-D)-e+[specify expriration date]:expiration date (YYYY-MM-DD)'
+    '(-D)-e+[specify expiration date]:expiration date (YYYY-MM-DD)'
     '(-D)-f+[specify inactive days]:inactive days'
     '(-D)-g+[initial group]:initial group:_groups'
     '(-D)-G+[supplementary groups]:supplementary groups:_groups -S,'
diff --git a/Completion/Unix/Command/_w3m b/Completion/Unix/Command/_w3m
index 798f2e760..2d4202112 100644
--- a/Completion/Unix/Command/_w3m
+++ b/Completion/Unix/Command/_w3m
@@ -3,7 +3,7 @@
 local curcontext="$curcontext" state line
 typeset -A opt_args
 
-_arguments \
+_arguments -C \
   '-t[tabwidth]:tabwidth:' \
   '-r[ignore backspace effect]' \
   '-l[preserved lines]:number of lines:' \
diff --git a/Completion/Unix/Type/.distfiles b/Completion/Unix/Type/.distfiles
index 04c30b4b0..40a193a40 100644
--- a/Completion/Unix/Type/.distfiles
+++ b/Completion/Unix/Type/.distfiles
@@ -8,5 +8,5 @@ _domains             _path_files          _ps                  _user_at_host
 _files               _pdf                 _pspdf               _users
 _groups              _perl_basepods       _signals             _users_on
 _hosts               _perl_builtin_funcs  _tar_archive         _time_zone
-_file_systems        _net_interfaces
+_file_systems        _net_interfaces      _terminals
 '
diff --git a/Completion/Unix/Type/_terminals b/Completion/Unix/Type/_terminals
new file mode 100644
index 000000000..7dbfeeba5
--- /dev/null
+++ b/Completion/Unix/Type/_terminals
@@ -0,0 +1,8 @@
+#compdef infocmp
+
+local desc expl
+
+desc=( $TERMINFO ~/.terminfo $TERMINFO_DIRS /usr/{,share/}{,lib/}terminfo )
+
+_wanted terminals expl 'terminal name' \
+    compadd "$@" - $desc/*/*(N:t)