about summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/.distfiles31
-rw-r--r--Completion/Unix/Command/_ant102
-rw-r--r--Completion/Unix/Command/_iconv55
-rw-r--r--Completion/Unix/Command/_unace18
4 files changed, 206 insertions, 0 deletions
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles
new file mode 100644
index 000000000..b8d93beed
--- /dev/null
+++ b/Completion/Unix/Command/.distfiles
@@ -0,0 +1,31 @@
+DISTFILES_SRC='
+.distfiles
+_a2ps         _bittorrent   _darcs
+_dvi          _gzip         _man          _rcs          _w3m
+_apachectl    _enscript     _iconv        _mh           _rlogin       _webbrowser
+_cdrecord     _fakeroot     _imagemagick  _mount        _sh           _wget
+_arp          _fetchmail    _init_d       _mutt         _slrn         _whereis
+_bison        _find         _ispell       _mysql_utils  _socket       _whois
+_bzip2        _finger       _java         _ncftp        _ssh          _xargs
+_chown        _flex         _joe          _nslookup     _strip        _yodl
+_compress     _gcc          _killall      _pack         _stty         _yp
+_configure    _gdb          _look         _patch        _su           _zcat
+_cpio         _getconf      _lp           _pbm          _sudo         _zdump
+_cvs          _gnu_generic  _ls           _perl         _tar          _zip
+_dd           _gprof        _lynx         _perldoc      _telnet       _pine
+_dict         _grep         _lzop         _prcs         _tiff         _elm
+_diff         _gs           _make         _psutils      _tin	      _mail
+_last         _loadkeys     _ruby         _sysctl       _links        _samba
+_user_admin   _rsync        _arping	  _spamassassin _mtools       _ifconfig
+_fsh          _chkconfig    _cdcd         _irssi        _mysqldiff    _sccs
+_aap          _ant          _antiword     _apm          _attr
+_baz          _bogofilter
+_cal          _chmod        _du           _ecasound     _elinks       _figlet
+_getent       _global       _gpg          _gphoto2      _less         _lsof
+_mencal       _mt           _mtr          _netcat       _nice         _nmap
+_perforce     _php          _postfix      _printenv     _python
+_raggle       _rar	    _renice
+_sablotron    _screen       _sed          _subversion
+_texinfo      _tla          _tidy
+_unace        _uniq         _vorbis       _vux          _wiggle       _xmlsoft
+'
diff --git a/Completion/Unix/Command/_ant b/Completion/Unix/Command/_ant
new file mode 100644
index 000000000..6ef0e733d
--- /dev/null
+++ b/Completion/Unix/Command/_ant
@@ -0,0 +1,102 @@
+#compdef ant -value-,ANT_ARGS,-default-
+
+typeset -A opt_args
+local buildfile tmp state line curcontext="$curcontext" ret=1
+local targets importedfiles
+local c target='*:target:->target'
+
+c=( $ANT_HOME/lib/*.jar )
+
+if [[ $service = *ANT_ARGS* ]]; then
+  compset -q
+  words=( fake "$words[@]" )
+  (( CURRENT++ ))
+  unset target
+fi
+
+_arguments -C \
+  '-help[display usage information]' \
+  '-projecthelp[print project help information]' \
+  '-version[display version information]' \
+  '-diagnostics[display info useful to problem diagnosis]' \
+  '(-q -quiet)'{-q,-quiet}'[be extra quiet]' \
+  '(-v -verbose)'{-v,-verbose}'[be more verbose]' \
+  '-debug[print debugging information]' \
+  '-emacs[produce logging information without adornments]' \
+  '(-l -logfile)'{-l,-logfile}'[use specified file for log]:logfile:_files' \
+  '-logger[the class which is to perform logging]:classname:_java_class -cp ${(j.:.)c}' \
+  '*-listener[add an instance of class as a project listener]:classname:_java_class -cp ${(j.:.)c}' \
+  '(-f -file -buildfile -find)'{-f,-file,-buildfile}'[use specified build file]:build file:_files' \
+  '*-D[specify property with value to use]:property:->property' \
+  '-propertyfile[load properties from specified file]:property file:_files' \
+  '-inputhandler[specify class which will handle input requests]:class:_java_class -cp ${(j.\:.)c}' \
+  '(-f -file -buildfile)-find[search for build file towards the root of filesystem]:build file:(build.xml)' \
+  $target && ret=0
+
+case $state in
+  property)
+    if compset -P '*='; then
+      _default
+    else
+      _message -e properties 'property name'
+    fi
+  ;;
+  target)
+    if zstyle -t ":completion:${curcontext}:targets" call-command; then
+      # Run ant -projecthelp also passing any of -find, -buildfile or -f options.
+      # Parse output into an array of the format "target:description".
+      # For the array to be set with correct argument boundaries, the entire
+      # set statement needs to be eval'd.  On Cygwin, need to kill \r's output
+      # from Java or parsing will fail.
+      eval set -A tmp "${$(_call_program targets "$words[1]" $buildxml -projecthelp |
+	while read target desc
+	do
+          # This loop reads ant -projecthelp output from versions 1.3 to 1.5
+          ln="${target}${desc:+:$desc}"
+          [[ $target = "" ]] && continue  # skip blank lines
+          case $ln in
+              (Buildfile:*)
+                  buildfile=$desc
+              ;;
+              (Default:target:*)
+                  # with version 1.5, target is on the same line
+                  default_target="${${desc/target:/}# }"
+                  # versions 1.3 and 1.4 with default target on a separate line
+                  if [[ -z $default_target ]]; then
+                      read junk
+                      read default_target junk
+                  fi
+                  # Output target again indicating its the default one.
+                  print -n "'${default_target}:(Default target) ' "
+              ;;
+              (Searching:*|Main:targets:|Subtargets:|BUILD:SUCCESSFUL|Total:time:
+	      *)
+              ;;
+              (*)
+                  # Return target and description
+                  print -n "'$ln' "
+              ;;
+          esac
+	done
+      )//$'\015'}"
+      _describe 'target' tmp && ret=0
+    else
+      if [[ -n $opt_args[-find] ]]; then
+	buildfile=( (../)#${opt_args[-find]:-build.xml}(N[-1]) )
+      else
+	buildfile=${(v)opt_args[(I)(-f|-file|-buildfile)]:-build.xml}
+      fi
+      if [[ -f $buildfile ]]; then
+        importedfiles=( $(sed -n "s/ *<import[^>]* file=[\"']\([^\"']*\)[\"'].*/\1/p" < $buildfile) )
+        targets=( $(sed -n "s/ *<target[^>]* name=[\"']\([^\"']*\)[\"'].*/\1/p" $buildfile) )
+        (( $#importedfiles )) && targets+=( $(cd $buildfile:h;
+	    sed -n "s/ *<target[^>]* name=[\"']\([^\"']*\)[\"'].*/\1/p" $importedfiles) )
+	_wanted targets expl target compadd -a targets && ret=0
+      else
+	_message -e targets target
+      fi
+    fi
+  ;;
+esac
+
+return ret
diff --git a/Completion/Unix/Command/_iconv b/Completion/Unix/Command/_iconv
new file mode 100644
index 000000000..92fa17e34
--- /dev/null
+++ b/Completion/Unix/Command/_iconv
@@ -0,0 +1,55 @@
+#compdef iconv
+
+local expl curcontext="$curcontext" state line ret=1
+local LOCPATH="${LOCPATH:-/usr/lib/nls/loc}"
+local -U codeset
+
+if _pick_variant gnu=GNU unix --version; then
+
+  local exargs="--list -? --help --usage --version -V"
+  _arguments -C -S -s \
+    "(-f --from-code $exargs)"{-f+,--from-code=}'[specify code set of input file]:code set:->codeset' \
+    "(-t --to-code $exargs)"{-t+,--to-code=}'[specify code set for output]:code set:->codeset' \
+    '(- 1)--list[list all character code sets]' \
+    "($exargs)-c[omit invalid characters from output]" \
+    "(-o --output $exargs)"{-o+,--output=}'[specify output file]:output file:_files' \
+    "(-s --silent --verbose $exargs)"{-s,--silent}'[suppress warnings]' \
+    "(-s --silent $exargs)--verbose[print progress information]" \
+    '(-)'{-\?,--help}'[display help information]' \
+    '(-)--usage[display a short usage message]' \
+    '(-)'{-V,--version}'[print program version]' \
+    '1:input file:_files' && return 0
+
+  if [[ $state = codeset ]]; then
+    if compset -P '*/'; then
+      _wanted option expl option compadd "$@" /TRANSLIT && ret=0
+    else
+      _wanted codesets expl 'code set' compadd "$@" \
+	  -M 'm:{a-zA-Z}={A-Za-z} r:|-=* r:|=*' \
+	  ${${${(f)"$(_call_program codesets iconv --list|sed -n '/^$/,$ p')"}## #}%//} && ret=0
+    fi
+  fi
+
+  return ret
+else
+
+  _arguments -C \
+    '-f[specify code set of input file]:code set:->codeset' \
+    '-t[specify code set for output]:code set:->codeset' \
+    '1:file:_files' && return 0
+
+  if [[ $state = codeset ]]; then
+    if [[ -f /usr/lib/iconv/iconv_data ]]; then  # IRIX & Solaris
+      codeset=( ${${(f)"$(</usr/lib/iconv/iconv_data)"}%%[[:blank:]]*} )
+      codeset+=( /usr/lib/iconv/*%*.so(Ne.'reply=( ${${REPLY:t}%%%*} ${${REPLY:r}#*%} )'.) )
+    elif [[ -d $LOCPATH/iconv ]]; then  # OSF
+      codeset=( $LOCPATH/iconv/*(N:t) )
+      codeset=( ${(j:_:s:_:)codeset} )
+    else
+      return 1
+    fi
+
+    _wanted codesets expl 'code set' compadd "$@" -a codeset
+  fi
+
+fi
diff --git a/Completion/Unix/Command/_unace b/Completion/Unix/Command/_unace
new file mode 100644
index 000000000..8226ec28a
--- /dev/null
+++ b/Completion/Unix/Command/_unace
@@ -0,0 +1,18 @@
+#compdef unace
+
+_arguments -S \
+  '-c[show comments]' \
+  '-f[full path matching]' \
+  '-o[overwrite files]' \
+  '-p+[specify password]:password' \
+  '-y[assume yes on all queries]' \
+  '-x+[specify files to exclude]:files' \
+  '-h[print help information]' \
+  '1:unace command:((
+    e\:extract\ files
+    l\:list\ archive
+    t\:test\ archive\ integrity
+    v\:list\ archive\ \(verbose\)
+    x\:extract\ files\ with\ full\ path
+  ))' \
+  '*:files:_files -g "*.ace(-.)"'