summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.distfiles6
-rw-r--r--ChangeLog116
-rw-r--r--Completion/.distfiles3
-rw-r--r--Completion/AIX/.distfiles1
-rw-r--r--Completion/AIX/Command/.distfiles2
-rw-r--r--Completion/AIX/Type/.distfiles2
-rw-r--r--Completion/BSD/.distfiles1
-rw-r--r--Completion/BSD/Command/.distfiles17
-rw-r--r--Completion/Base/.distfiles1
-rw-r--r--Completion/Base/Completer/.distfiles16
-rw-r--r--Completion/Base/Core/.distfiles4
-rw-r--r--Completion/Base/Utility/.distfiles23
-rw-r--r--Completion/Base/Utility/_sequence39
-rw-r--r--Completion/Base/Widget/.distfiles5
-rw-r--r--Completion/Cygwin/Command/.distfiles5
-rw-r--r--Completion/Darwin/Command/.distfiles8
-rw-r--r--Completion/Darwin/Type/.distfiles2
-rw-r--r--Completion/Debian/.distfiles1
-rw-r--r--Completion/Debian/Command/.distfiles50
-rw-r--r--Completion/Debian/Type/.distfiles2
-rw-r--r--Completion/Linux/Command/.distfiles36
-rw-r--r--Completion/Linux/Command/_docker410
-rw-r--r--Completion/Linux/Type/.distfiles4
-rw-r--r--Completion/Mandriva/.distfiles1
-rw-r--r--Completion/Mandriva/Command/.distfiles3
-rw-r--r--Completion/Redhat/.distfiles1
-rw-r--r--Completion/Redhat/Command/.distfiles3
-rw-r--r--Completion/Solaris/Command/.distfiles26
-rw-r--r--Completion/Solaris/Type/.distfiles4
-rw-r--r--Completion/Unix/.distfiles1
-rw-r--r--Completion/Unix/Command/.distfiles276
-rw-r--r--Completion/Unix/Command/_chsh40
-rw-r--r--Completion/Unix/Command/_dsh33
-rw-r--r--Completion/Unix/Command/_git4
-rw-r--r--Completion/Unix/Command/_mosh32
-rw-r--r--Completion/Unix/Command/_mount11
-rw-r--r--Completion/Unix/Command/_nm80
-rw-r--r--Completion/Unix/Command/_nmap2
-rw-r--r--Completion/Unix/Command/_pgrep8
-rw-r--r--Completion/Unix/Command/_rsync5
-rw-r--r--Completion/Unix/Command/_wget19
-rw-r--r--Completion/Unix/Command/_zip5
-rw-r--r--Completion/Unix/Type/.distfiles54
-rw-r--r--Completion/Unix/Type/_pids43
-rw-r--r--Completion/Unix/Type/_users2
-rw-r--r--Completion/X/.distfiles1
-rw-r--r--Completion/X/Command/.distfiles34
-rw-r--r--Completion/X/Type/.distfiles8
-rw-r--r--Completion/X/Utility/.distfiles2
-rw-r--r--Completion/Zsh/.distfiles1
-rw-r--r--Completion/Zsh/Command/.distfiles49
-rw-r--r--Completion/Zsh/Command/_kill6
-rw-r--r--Completion/Zsh/Context/.distfiles17
-rw-r--r--Completion/Zsh/Function/.distfiles3
-rw-r--r--Completion/Zsh/Type/.distfiles25
-rw-r--r--Completion/openSUSE/Command/.distfiles6
-rw-r--r--Config/.distfiles4
-rw-r--r--Config/version.mk4
-rw-r--r--Doc/.distfiles8
-rw-r--r--Doc/Zsh/.distfiles68
-rw-r--r--Doc/Zsh/compsys.yo13
-rw-r--r--Doc/Zsh/tcpsys.yo13
-rw-r--r--Doc/help/.distfiles2
-rw-r--r--Etc/.distfiles25
-rw-r--r--Etc/.gitignore1
-rw-r--r--Functions/.distfiles1
-rw-r--r--Functions/Calendar/.distfiles12
-rw-r--r--Functions/Chpwd/.distfiles7
-rw-r--r--Functions/Compctl/.distfiles2
-rw-r--r--Functions/Example/.distfiles4
-rw-r--r--Functions/Exceptions/.distfiles2
-rw-r--r--Functions/MIME/.distfiles5
-rw-r--r--Functions/Misc/.distfiles32
-rw-r--r--Functions/Newuser/.distfiles2
-rw-r--r--Functions/Prompts/.distfiles20
-rw-r--r--Functions/TCP/.distfiles5
-rw-r--r--Functions/TCP/tcp_expect35
-rw-r--r--Functions/VCS_Info/.distfiles19
-rw-r--r--Functions/VCS_Info/Backends/.distfiles25
-rw-r--r--Functions/Zftp/.distfiles8
-rw-r--r--Functions/Zle/.distfiles48
-rw-r--r--Misc/.distfiles5
-rw-r--r--NEWS7
-rw-r--r--Scripts/.distfiles2
-rw-r--r--Src/.distfiles51
-rw-r--r--Src/Builtins/.distfiles3
-rw-r--r--Src/Modules/.distfiles59
-rw-r--r--Src/Zle/.distfiles12
-rw-r--r--Src/glob.c4
-rw-r--r--Src/jobs.c15
-rw-r--r--Src/utils.c17
-rw-r--r--StartupFiles/.distfiles2
-rw-r--r--Test/.distfiles50
-rw-r--r--Test/A05execution.ztst2
-rw-r--r--Util/.distfiles6
-rwxr-xr-xUtil/mkdisttree.sh13
96 files changed, 875 insertions, 1297 deletions
diff --git a/.distfiles b/.distfiles
index 57262947c..d618a779f 100644
--- a/.distfiles
+++ b/.distfiles
@@ -1,8 +1,4 @@
DISTFILES_SRC='
- .cvsignore .distfiles .editorconfig .gitignore .preconfig Makefile.in
- ChangeLog
- FEATURES INSTALL LICENCE MACHINES META-FAQ NEWS README
- aclocal.m4 aczsh.m4 configure.ac
+ META-FAQ
configure config.h.in stamp-h.in
- config.guess config.sub install-sh mkinstalldirs
'
diff --git a/ChangeLog b/ChangeLog
index 5378071fb..29f6fd314 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,119 @@
+2014-08-24 Peter Stephenson <p.w.stephenson@ntlworld.com>
+
+ * unposted: Config/version.mk: 5.0.5-dev-3.
+
+2014-08-24 Barton E. Schaefer <schaefer@zsh.org>
+
+ * unposted (see 33050): Completion/Unix/Command/_git: un-transpose
+ help text for git merge -{-no,}-verify
+
+2014-08-23 Peter Stephenson <p.w.stephenson@ntlworld.com>
+
+ * 33047: .distfiles, Completion/.distfiles,
+ Completion/AIX/.distfiles, Completion/AIX/Command/.distfiles,
+ Completion/AIX/Type/.distfiles, Completion/BSD/.distfiles,
+ Completion/BSD/Command/.distfiles, Completion/Base/.distfiles,
+ Completion/Base/Completer/.distfiles,
+ Completion/Base/Core/.distfiles,
+ Completion/Base/Utility/.distfiles,
+ Completion/Base/Widget/.distfiles,
+ Completion/Cygwin/Command/.distfiles,
+ Completion/Darwin/Command/.distfiles,
+ Completion/Darwin/Type/.distfiles, Completion/Debian/.distfiles,
+ Completion/Debian/Command/.distfiles,
+ Completion/Debian/Type/.distfiles,
+ Completion/Linux/Command/.distfiles,
+ Completion/Linux/Type/.distfiles,
+ Completion/Mandriva/.distfiles,
+ Completion/Mandriva/Command/.distfiles,
+ Completion/Redhat/.distfiles,
+ Completion/Redhat/Command/.distfiles,
+ Completion/Solaris/Command/.distfiles,
+ Completion/Solaris/Type/.distfiles, Completion/Unix/.distfiles,
+ Completion/Unix/Command/.distfiles,
+ Completion/Unix/Type/.distfiles, Completion/X/.distfiles,
+ Completion/X/Command/.distfiles, Completion/X/Type/.distfiles,
+ Completion/X/Utility/.distfiles, Completion/Zsh/.distfiles,
+ Completion/Zsh/Command/.distfiles,
+ Completion/Zsh/Context/.distfiles,
+ Completion/Zsh/Function/.distfiles,
+ Completion/Zsh/Type/.distfiles,
+ Completion/openSUSE/Command/.distfiles, Config/.distfiles,
+ Doc/.distfiles,Doc/Zsh/.distfiles, Doc/help/.distfiles,
+ Etc/.distfiles, Functions/.distfiles,
+ Functions/Calendar/.distfiles, Functions/Chpwd/.distfiles,
+ Functions/Compctl/.distfiles, Functions/Example/.distfiles,
+ Functions/Exceptions/.distfiles, Functions/MIME/.distfiles,
+ Functions/Misc/.distfiles, Functions/Newuser/.distfiles,
+ Functions/Prompts/.distfiles, Functions/TCP/.distfiles,
+ Functions/VCS_Info/.distfiles,
+ Functions/VCS_Info/Backends/.distfiles,
+ Functions/Zftp/.distfiles, Functions/Zle/.distfiles,
+ Misc/.distfiles, Scripts/.distfiles, Src/.distfiles,
+ Src/Builtins/.distfiles, Src/Modules/.distfiles,
+ Src/Zle/.distfiles, StartupFiles/.distfiles, Test/.distfiles,
+ Util/.distfiles, Util/mkdisttree.sh: Files controlled by git
+ are part of the source distribution unless explicitly included
+ in DISTFILES_NOT. The .distfiles file is still needed for
+ the directory to be processed.
+
+ * unposted: Etc/.gitignore: ignore generated FAQ*.html files.
+
+2014-08-23 Barton E. Schaefer <schaefer@zsh.org>
+
+ * 33046: Completion/Unix/Command/.distfiles,
+ Completion/Unix/Command/_chsh, Completion/Unix/Type/_users: new
+ completion for "chsh"
+
+2014-08-22 Barton E. Schaefer <schaefer@zsh.org>
+
+ * 33042: NEWS, Src/jobs.c: $? and $pipestatus report 128+signal
+ number for stopped jobs as well as terminated jobs
+
+2014-08-21 Mikael Magnusson <mikachu@gmail.com>
+
+ * 33038: Src/glob.c: Fix {a..b} expansion hanging when either
+ endpoint is a literal NUL character
+
+2014-08-20 Barton E. Schaefer <schaefer@zsh.org>
+
+ * Lokesh Mandvekar: 33032: Completion/Linux/Command/_docker,
+ Completion/Linux/Command/.distfiles: new completion for docker
+
+2014-08-15 Barton E. Schaefer <schaefer@zsh.org>
+
+ * unposted (see 33006): Test/A05execution.ztst: timeout the final
+ "read" in hung shell regression
+
+ * 33012: Src/utils.c: add an error return value (-1) to xsymlinks()
+ to differentiate when xbuf is set to the empty string; silences
+ bogus warning about failed expansion
+
+2014-08-14 Oliver Kiddle <opk@zsh.org>
+
+ * 32998: Completion/Unix/Command/_dsh, Completion/Unix/Command/_nm,
+ Completion/Unix/Command/_mosh, Completion/Unix/Command/_rsync,
+ Completion/Unix/Command/_wget: completion function updates
+
+ * 32997: Completion/Base/Utility/_sequence, Doc/Zsh/compsys.yo,
+ Completion/Unix/Command/_mount, Completion/Unix/Command/_nmap,
+ Completion/Unix/Command/_pgrep, Completion/Unix/Command/_zip:
+ add completion utility function for lists
+
+2014-08-14 Peter Stephenson <p.stephenson@samsung.com>
+
+ * 33002: Doc/Zsh/tcpsys.yo, Functions/TCP/tcp_expect: add option
+ -P to tcp_expect for tagging matches with a string rather than
+ a parameter index.
+
+2014-08-13 Oliver Kiddle <opk@zsh.org>
+
+ * 32925: Completion/Zsh/Command/_kill: complete process groups,
+ partly as a way to suppress insertion of ambiguous PID prefix
+
+ * 32893: Completion/Unix/Type/_pids: move use of _call_program
+ inside the _tags loop to allow processes to be separated
+
2014-08-12 Peter Stephenson <p.w.stephenson@ntlworld.com>
* Config/version.mk: update to 5.0.5-dev-2.
diff --git a/Completion/.distfiles b/Completion/.distfiles
index 65ab759c1..f03668b3a 100644
--- a/Completion/.distfiles
+++ b/Completion/.distfiles
@@ -1,5 +1,2 @@
DISTFILES_SRC='
-.distfiles
-.cvsignore README compaudit compdump compinit compinstall
-bashcompinit
'
diff --git a/Completion/AIX/.distfiles b/Completion/AIX/.distfiles
index 9e276f99b..f03668b3a 100644
--- a/Completion/AIX/.distfiles
+++ b/Completion/AIX/.distfiles
@@ -1,3 +1,2 @@
DISTFILES_SRC='
-.distfiles
'
diff --git a/Completion/AIX/Command/.distfiles b/Completion/AIX/Command/.distfiles
index 1f2ffc77d..f03668b3a 100644
--- a/Completion/AIX/Command/.distfiles
+++ b/Completion/AIX/Command/.distfiles
@@ -1,4 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_floppy _lscfg _lsdev _lslv _lspv _lsvg _smit
'
diff --git a/Completion/AIX/Type/.distfiles b/Completion/AIX/Type/.distfiles
index 4103c6919..f03668b3a 100644
--- a/Completion/AIX/Type/.distfiles
+++ b/Completion/AIX/Type/.distfiles
@@ -1,4 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_logical_volumes _object_classes _physical_volumes _volume_groups
'
diff --git a/Completion/BSD/.distfiles b/Completion/BSD/.distfiles
index 9e276f99b..f03668b3a 100644
--- a/Completion/BSD/.distfiles
+++ b/Completion/BSD/.distfiles
@@ -1,3 +1,2 @@
DISTFILES_SRC='
-.distfiles
'
diff --git a/Completion/BSD/Command/.distfiles b/Completion/BSD/Command/.distfiles
index d08edf814..f03668b3a 100644
--- a/Completion/BSD/Command/.distfiles
+++ b/Completion/BSD/Command/.distfiles
@@ -1,19 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_bsd_pkg
-_chflags
-_csup
-_cvsup
-_fetch
-_freebsd-update
-_fstat
-_kld
-_pfctl
-_portaudit
-_portlint
-_portmaster
-_portsnap
-_powerd
-_procstat
-_sockstat
'
diff --git a/Completion/Base/.distfiles b/Completion/Base/.distfiles
index 9e276f99b..f03668b3a 100644
--- a/Completion/Base/.distfiles
+++ b/Completion/Base/.distfiles
@@ -1,3 +1,2 @@
DISTFILES_SRC='
-.distfiles
'
diff --git a/Completion/Base/Completer/.distfiles b/Completion/Base/Completer/.distfiles
index 804c57990..f03668b3a 100644
--- a/Completion/Base/Completer/.distfiles
+++ b/Completion/Base/Completer/.distfiles
@@ -1,18 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_all_matches
-_approximate
-_complete
-_correct
-_expand
-_expand_alias
-_extensions
-_history
-_ignored
-_list
-_match
-_menu
-_oldlist
-_prefix
-_user_expand
'
diff --git a/Completion/Base/Core/.distfiles b/Completion/Base/Core/.distfiles
index acb6695c9..f03668b3a 100644
--- a/Completion/Base/Core/.distfiles
+++ b/Completion/Base/Core/.distfiles
@@ -1,6 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_all_labels _main_complete _next_label _requested _tags
-_description _message _normal _setup _wanted
-_dispatch
'
diff --git a/Completion/Base/Utility/.distfiles b/Completion/Base/Utility/.distfiles
index 91ddf881b..f03668b3a 100644
--- a/Completion/Base/Utility/.distfiles
+++ b/Completion/Base/Utility/.distfiles
@@ -1,25 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_alternative
-_arg_compile
-_arguments
-_cache_invalid
-_call_function
-_comp_locale
-_complete_help_generic
-_call_program
-_combination
-_set_command
-_describe
-_multi_parts
-_nothing
-_regex_arguments
-_retrieve_cache
-_sep_parts
-_store_cache
-_sub_commands
-_values
-_guard
-_pick_variant
-_regex_words
'
diff --git a/Completion/Base/Utility/_sequence b/Completion/Base/Utility/_sequence
new file mode 100644
index 000000000..391e5f78f
--- /dev/null
+++ b/Completion/Base/Utility/_sequence
@@ -0,0 +1,39 @@
+#autoload
+
+# a separated list where each component of the list uses the same
+# function.
+
+# -n num : number of items in list [default is unlimited]
+# -s sep : specify separator [defaults to comma]
+# -d : duplicate values allowed
+
+local curcontext="$curcontext" nm="$compstate[nmatches]" pre nosep minus
+local -a sep num pref suf end uniq dedup
+
+zparseopts -D -a opts s:=sep n:=num p:=pref i:=pref P:=pref I:=suf S:=suf q=suf r:=suf R:=suf C:=cont d=uniq M: J: X: x:
+(( $#cont )) && curcontext="$curcontext%:*}:$cont[2]"
+(( $#sep )) || sep[2]=,
+
+if (( $+suf[(r)-S] )); then
+ end="${(q)suf[suf[(i)-S]+1]}"
+ (( $#end )) && compset -S ${end}\* && suf=() && nosep=1
+fi
+
+if (( ! $#uniq )); then
+ (( $+pref[(r)-P] )) && pre="${(q)pref[pref[(i)-P]+1]}"
+ typeset -T unique="${PREFIX#$pre}" uniq $sep[2]
+ dedup=( ${(q)uniq[1,-2]} )
+ unique="${SUFFIX}"
+ dedup+=( ${(q)uniq[2,-1]} )
+fi
+
+if (( ! $#num )) || (( num[2] > 1 )) && ! compset -P $(( num[2] - 1 )) \*$sep[2]; then
+ (( nosep )) || suf=( -S $sep[2] -r "$end[1]${sep[2][1]} \t\n\-" )
+ compset -S ${sep[2]}\* && suf=()
+ compset -P \*$sep[2] && pref=()
+else
+ pref=()
+fi
+
+(( minus = argv[(ib:2:)-] ))
+"${(@)argv[1,minus-1]}" "$opts[@]" -F dedup "$pref[@]" "$suf[@]" "${(@)argv[minus+1,-1]}"
diff --git a/Completion/Base/Widget/.distfiles b/Completion/Base/Widget/.distfiles
index f6c73a113..f03668b3a 100644
--- a/Completion/Base/Widget/.distfiles
+++ b/Completion/Base/Widget/.distfiles
@@ -1,7 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_bash_completions _correct_filename _history_complete_word
-_complete_debug _correct_word _most_recent_file
-_complete_help _expand_word _next_tags
-_complete_tag _generic _read_comp
'
diff --git a/Completion/Cygwin/Command/.distfiles b/Completion/Cygwin/Command/.distfiles
index eec683b01..f03668b3a 100644
--- a/Completion/Cygwin/Command/.distfiles
+++ b/Completion/Cygwin/Command/.distfiles
@@ -1,7 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_cygcheck _cygpath _cygrunsrv _cygserver
-_cygstart _dumper _getclip
-_mkshortcut _mkzsh _pscp _putclip
-_readshortcut
'
diff --git a/Completion/Darwin/Command/.distfiles b/Completion/Darwin/Command/.distfiles
index 5756f542d..f03668b3a 100644
--- a/Completion/Darwin/Command/.distfiles
+++ b/Completion/Darwin/Command/.distfiles
@@ -1,10 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_defaults
-_fink
-_hdiutil
-_open
-_qtplay
-_softwareupdate
-_system_profiler
'
diff --git a/Completion/Darwin/Type/.distfiles b/Completion/Darwin/Type/.distfiles
index 059069d60..f03668b3a 100644
--- a/Completion/Darwin/Type/.distfiles
+++ b/Completion/Darwin/Type/.distfiles
@@ -1,4 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_mac_applications _mac_files_for_application _retrieve_mac_apps
'
diff --git a/Completion/Debian/.distfiles b/Completion/Debian/.distfiles
index 9e276f99b..f03668b3a 100644
--- a/Completion/Debian/.distfiles
+++ b/Completion/Debian/.distfiles
@@ -1,3 +1,2 @@
DISTFILES_SRC='
-.distfiles
'
diff --git a/Completion/Debian/Command/.distfiles b/Completion/Debian/Command/.distfiles
index ed1575091..f03668b3a 100644
--- a/Completion/Debian/Command/.distfiles
+++ b/Completion/Debian/Command/.distfiles
@@ -1,52 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_a2utils
-_apt
-_apt-file
-_aptitude
-_apt-move
-_apt-show-versions
-_auto-apt
-_axi-cache
-_bts
-_bug
-_cdbs-edit-patch
-_dak
-_dchroot
-_dchroot-dsa
-_dcut
-_debchange
-_debdiff
-_debfoster
-_debsign
-_dlocate
-_dpatch-edit-patch
-_dpkg
-_dpkg-buildpackage
-_dpkg-cross
-_dpkg-repack
-_dpkg_source
-_dput
-_dupload
-_git-buildpackage
-_invoke-rc.d
-_lighttpd
-_lintian
-_madison
-_make-kpkg
-_members
-_mergechanges
-_module-assistant
-_pbuilder
-_piuparts
-_reprepro
-_schroot
-_svn-buildpackage
-_toolchain-source
-_update-alternatives
-_update-rc.d
-_uscan
-_wajig
-_wanna-build
-_vim-addons _grep-excuses
'
diff --git a/Completion/Debian/Type/.distfiles b/Completion/Debian/Type/.distfiles
index 9f5db79db..f03668b3a 100644
--- a/Completion/Debian/Type/.distfiles
+++ b/Completion/Debian/Type/.distfiles
@@ -1,4 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_deb_packages
'
diff --git a/Completion/Linux/Command/.distfiles b/Completion/Linux/Command/.distfiles
index 7ae5cf91e..f03668b3a 100644
--- a/Completion/Linux/Command/.distfiles
+++ b/Completion/Linux/Command/.distfiles
@@ -1,38 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_acpi
-_acpitool
-_analyseplugin
-_brctl
-_btrfs
-_chrt
-_cryptsetup
-_ethtool
-_fusermount
-_ionice
-_ipset
-_iptables
-_iwconfig
-_losetup
-_lsusb
-_mdadm
-_mii-tool
-_modutils
-_mondo
-_nmcli
-_pkgtool
-_rpmbuild
-_schedtool
-_ss
-_sshfs
-_strace
-_sysstat
-_tpb
-_tpconfig
-_tune2fs
-_uml
-_valgrind
-_vserver
-_wpa_cli
-_yast
'
diff --git a/Completion/Linux/Command/_docker b/Completion/Linux/Command/_docker
new file mode 100644
index 000000000..faf17b2be
--- /dev/null
+++ b/Completion/Linux/Command/_docker
@@ -0,0 +1,410 @@
+#compdef docker
+#
+# zsh completion for docker (http://docker.com)
+#
+# version: 0.3.0
+# github: https://github.com/felixr/docker-zsh-completion
+#
+# contributers:
+# - Felix Riedel
+# - Vincent Bernat
+#
+# license:
+#
+# Copyright (c) 2013, Felix Riedel
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of the <organization> nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+__parse_docker_list() {
+ awk '
+NR == 1 {
+ idx=1;i=0;f[i]=0
+ header=$0
+ while ( match(header, / ([A-Z]+|[A-Z]+ [A-Z]+)/) ) {
+ idx += RSTART+1
+ f[++i]=idx
+ header = substr($0,idx)
+ }
+ f[++i]=999
+}
+
+NR > 1 '"$1"' {
+ for(j=0;j<i;j++) {
+ x[j] = substr($0, f[j], f[j+1]-f[j]-1)
+ gsub(/[ ]+$/, "", x[j])
+ }
+ printf("%s:%7s, %s\n", x[0], x[3], x[1])
+ if (x[6] != "") {
+ split(x[6], names, /,/)
+ for (name in names) printf("%s:%7s, %s\n", names[name], x[3], x[1])
+ }
+}
+'| sed -e 's/ \([hdwm]\)\(inutes\|ays\|ours\|eeks\)/\1/'
+}
+
+__docker_stoppedcontainers() {
+ local expl
+ declare -a stoppedcontainers
+ stoppedcontainers=(${(f)"$(_call_program commands docker ps -a | __parse_docker_list '&& / Exit/')"})
+ _describe -t containers-stopped "Stopped Containers" stoppedcontainers "$@"
+}
+
+__docker_runningcontainers() {
+ local expl
+ declare -a containers
+
+ containers=(${(f)"$(_call_program commands docker ps | __parse_docker_list)"})
+ _describe -t containers-active "Running Containers" containers "$@"
+}
+
+__docker_containers () {
+ __docker_stoppedcontainers "$@"
+ __docker_runningcontainers "$@"
+}
+
+__docker_images () {
+ local expl
+ declare -a images
+ images=(${(f)"$(_call_program commands docker images | awk '(NR > 1 && $1 != "<none>"){printf("%s", $1);if ($2 != "<none>") printf("\\:%s", $2); printf("\n")}')"})
+ images=($images ${(f)"$(_call_program commands docker images | awk '(NR > 1){printf("%s:%-15s in %s\n", $3,$2,$1)}')"})
+ _describe -t docker-images "Images" images
+}
+
+__docker_tags() {
+ local expl
+ declare -a tags
+ tags=(${(f)"$(_call_program commands docker images | awk '(NR>1){print $2}'| sort | uniq)"})
+ _describe -t docker-tags "tags" tags
+}
+
+__docker_repositories_with_tags() {
+ if compset -P '*:'; then
+ __docker_tags
+ else
+ __docker_repositories -qS ":"
+ fi
+}
+
+__docker_search() {
+ # declare -a dockersearch
+ local cache_policy
+ zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
+ if [[ -z "$cache_policy" ]]; then
+ zstyle ":completion:${curcontext}:" cache-policy __docker_caching_policy
+ fi
+
+ local searchterm cachename
+ searchterm="${words[$CURRENT]%/}"
+ cachename=_docker-search-$searchterm
+
+ local expl
+ local -a result
+ if ( [[ ${(P)+cachename} -eq 0 ]] || _cache_invalid ${cachename#_} ) \
+ && ! _retrieve_cache ${cachename#_}; then
+ _message "Searching for ${searchterm}..."
+ result=(${(f)"$(_call_program commands docker search ${searchterm} | awk '(NR>2){print $1}')"})
+ _store_cache ${cachename#_} result
+ fi
+ _wanted dockersearch expl 'Available images' compadd -a result
+}
+
+__docker_caching_policy()
+{
+ # oldp=( "$1"(Nmh+24) ) # 24 hour
+ oldp=( "$1"(Nmh+1) ) # 24 hour
+ (( $#oldp ))
+}
+
+
+__docker_repositories () {
+ local expl
+ declare -a repos
+ repos=(${(f)"$(_call_program commands docker images | sed -e '1d' -e 's/[ ].*//' | sort | uniq)"})
+ _describe -t docker-repos "Repositories" repos "$@"
+}
+
+__docker_commands () {
+ # local -a _docker_subcommands
+ local cache_policy
+
+ zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
+ if [[ -z "$cache_policy" ]]; then
+ zstyle ":completion:${curcontext}:" cache-policy __docker_caching_policy
+ fi
+
+ if ( [[ ${+_docker_subcommands} -eq 0 ]] || _cache_invalid docker_subcommands) \
+ && ! _retrieve_cache docker_subcommands;
+ then
+ _docker_subcommands=(${${(f)"$(_call_program commands
+ docker 2>&1 | sed -e '1,6d' -e '/^[ ]*$/d' -e 's/[ ]*\([^ ]\+\)\s*\([^ ].*\)/\1:\2/' )"}})
+ _docker_subcommands=($_docker_subcommands 'help:Show help for a command')
+ _store_cache docker_subcommands _docker_subcommands
+ fi
+ _describe -t docker-commands "docker command" _docker_subcommands
+}
+
+__docker_subcommand () {
+ local -a _command_args
+ case "$words[1]" in
+ (attach)
+ _arguments \
+ '--no-stdin[Do not attach stdin]' \
+ '--sig-proxy[Proxify all received signal]' \
+ ':containers:__docker_runningcontainers'
+ ;;
+ (build)
+ _arguments \
+ '--no-cache[Do not use cache when building the image]' \
+ '-q[Suppress verbose build output]' \
+ '--rm[Remove intermediate containers after a successful build]' \
+ '-t=-:repository:__docker_repositories_with_tags' \
+ ':path or URL:_directories'
+ ;;
+ (commit)
+ _arguments \
+ '--author=-[Author]:author: ' \
+ '-m=-[Commit message]:message: ' \
+ '--run=-[Configuration automatically applied when the image is run]:configuration: ' \
+ ':container:__docker_containers' \
+ ':repository:__docker_repositories_with_tags'
+ ;;
+ (cp)
+ _arguments \
+ ':container:->container' \
+ ':hostpath:_files'
+ case $state in
+ (container)
+ if compset -P '*:'; then
+ _files
+ else
+ __docker_containers -qS ":"
+ fi
+ ;;
+ esac
+ ;;
+ (diff|export)
+ _arguments '*:containers:__docker_containers'
+ ;;
+ (history)
+ _arguments \
+ '--no-trunc[Do not truncate output]' \
+ '-q[Only show numeric IDs]' \
+ '*:images:__docker_images'
+ ;;
+ (images)
+ _arguments \
+ '-a[Show all images]' \
+ '--no-trunc[Do not truncate output]' \
+ '-q[Only show numeric IDs]' \
+ '--tree[Output graph in tree format]' \
+ '--viz[Output graph in graphviz format]' \
+ ':repository:__docker_repositories'
+ ;;
+ (inspect)
+ _arguments \
+ '--format=-[Format the output using the given go template]:template: ' \
+ '*:containers:__docker_containers'
+ ;;
+ (import)
+ _arguments \
+ ':URL:(- http:// file://)' \
+ ':repository:__docker_repositories_with_tags'
+ ;;
+ (info)
+ ;;
+ (import)
+ _arguments \
+ ':URL:(- http:// file://)' \
+ ':repository:__docker_repositories_with_tags'
+ ;;
+ (insert)
+ _arguments '1:containers:__docker_containers' \
+ '2:URL:(http:// file://)' \
+ '3:file:_files'
+ ;;
+ (kill)
+ _arguments '*:containers:__docker_runningcontainers'
+ ;;
+ (load)
+ ;;
+ (login)
+ _arguments \
+ '-e=-[Email]:email: ' \
+ '-p=-[Password]:password: ' \
+ '-u=-[Username]:username: ' \
+ ':server: '
+ ;;
+ (logs)
+ _arguments \
+ '-f[Follow log output]' \
+ '*:containers:__docker_containers'
+ ;;
+ (port)
+ _arguments \
+ '1:containers:__docker_runningcontainers' \
+ '2:port:_ports'
+ ;;
+ (start)
+ _arguments \
+ '-a[Attach container'"'"'s stdout/stderr and forward all signals]' \
+ '-i[Attach container'"'"'s stding]' \
+ '*:containers:__docker_stoppedcontainers'
+ ;;
+ (rm)
+ _arguments \
+ '--link[Remove the specified link and not the underlying container]' \
+ '-v[Remove the volumes associated to the container]' \
+ '*:containers:__docker_stoppedcontainers'
+ ;;
+ (rmi)
+ _arguments \
+ '*:images:__docker_images'
+ ;;
+ (restart|stop)
+ _arguments '-t=-[Number of seconds to try to stop for before killing the container]:seconds to before killing:(1 5 10 30 60)' \
+ '*:containers:__docker_runningcontainers'
+ ;;
+ (top)
+ _arguments \
+ '1:containers:__docker_runningcontainers' \
+ '(-)*:: :->ps-arguments'
+ case $state in
+ (ps-arguments)
+ _ps
+ ;;
+ esac
+
+ ;;
+ (ps)
+ _arguments \
+ '-a[Show all containers]' \
+ '--before=-[Show only container created before...]:containers:__docker_containers' \
+ '-l[Show only the latest created container]' \
+ '-n=-[Show n last created containers, include non-running one]:n:(1 5 10 25 50)' \
+ '--no-trunc[Do not truncate output]' \
+ '-q[Only show numeric IDs]' \
+ '-s[Display sizes]' \
+ '--since=-[Show only containers created since...]:containers:__docker_containers'
+ ;;
+ (tag)
+ _arguments \
+ '-f[force]'\
+ ':image:__docker_images'\
+ ':repository:__docker_repositories_with_tags'
+ ;;
+ (run)
+ _arguments \
+ '-P[Publish all exposed ports to the host]' \
+ '-a[Attach to stdin, stdout or stderr]' \
+ '-c=-[CPU shares (relative weight)]:CPU shares:(0 10 100 200 500 800 1000)' \
+ '--cidfile=-[Write the container ID to the file]:CID file:_files' \
+ '-d[Detached mode: leave the container running in the background]' \
+ '*--dns=-[Set custom dns servers]:dns server: ' \
+ '*-e=-[Set environment variables]:environment variable: ' \
+ '--entrypoint=-[Overwrite the default entrypoint of the image]:entry point: ' \
+ '*--expose=-[Expose a port from the container without publishing it]: ' \
+ '-h=-[Container host name]:hostname:_hosts' \
+ '-i[Keep stdin open even if not attached]' \
+ '--link=-[Add link to another container]:link:->link' \
+ '--lxc-conf=-[Add custom lxc options]:lxc options: ' \
+ '-m=-[Memory limit (in bytes)]:limit: ' \
+ '--name=-[Container name]:name: ' \
+ '*-p=-[Expose a container'"'"'s port to the host]:port:_ports' \
+ '--privileged[Give extended privileges to this container]' \
+ '--rm[Remove intermediate containers when it exits]' \
+ '--sig-proxy[Proxify all received signal]' \
+ '-t[Allocate a pseudo-tty]' \
+ '-u=-[Username or UID]:user:_users' \
+ '*-v=-[Bind mount a volume (e.g. from the host: -v /host:/container, from docker: -v /container)]:volume: '\
+ '--volumes-from=-[Mount volumes from the specified container]:volume: ' \
+ '-w=-[Working directory inside the container]:directory:_directories' \
+ '(-):images:__docker_images' \
+ '(-):command: _command_names -e' \
+ '*::arguments: _normal'
+
+ case $state in
+ (link)
+ if compset -P '*:'; then
+ _wanted alias expl 'Alias' compadd -E ""
+ else
+ __docker_runningcontainers -qS ":"
+ fi
+ ;;
+ esac
+
+ ;;
+ (pull|search)
+ _arguments ':name:__docker_search'
+ ;;
+ (push)
+ _arguments ':repository:__docker_repositories_with_tags'
+ ;;
+ (save)
+ _arguments \
+ ':images:__docker_images'
+ ;;
+ (wait)
+ _arguments ':containers:__docker_runningcontainers'
+ ;;
+ (help)
+ _arguments ':subcommand:__docker_commands'
+ ;;
+ (*)
+ _message 'Unknown sub command'
+ esac
+
+}
+
+_docker () {
+ # Support for subservices, which allows for `compdef _docker docker-shell=_docker_containers`.
+ # Based on /usr/share/zsh/functions/Completion/Unix/_git without support for `ret`.
+ if [[ $service != docker ]]; then
+ _call_function - _$service
+ return
+ fi
+
+ local curcontext="$curcontext" state line
+ typeset -A opt_args
+
+ _arguments -C \
+ '-H=-[tcp://host:port to bind/connect to]:socket: ' \
+ '(-): :->command' \
+ '(-)*:: :->option-or-argument'
+
+ if (( CURRENT == 1 )); then
+
+ fi
+ case $state in
+ (command)
+ __docker_commands
+ ;;
+ (option-or-argument)
+ curcontext=${curcontext%:*:*}:docker-$words[1]:
+ __docker_subcommand
+ ;;
+ esac
+}
+
+_docker "$@"
diff --git a/Completion/Linux/Type/.distfiles b/Completion/Linux/Type/.distfiles
index 36c1b6b65..f03668b3a 100644
--- a/Completion/Linux/Type/.distfiles
+++ b/Completion/Linux/Type/.distfiles
@@ -1,6 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_fuse_arguments
-_fuse_values
-_wakeup_capable_devices
'
diff --git a/Completion/Mandriva/.distfiles b/Completion/Mandriva/.distfiles
index 9e276f99b..f03668b3a 100644
--- a/Completion/Mandriva/.distfiles
+++ b/Completion/Mandriva/.distfiles
@@ -1,3 +1,2 @@
DISTFILES_SRC='
-.distfiles
'
diff --git a/Completion/Mandriva/Command/.distfiles b/Completion/Mandriva/Command/.distfiles
index 72f101fd7..f03668b3a 100644
--- a/Completion/Mandriva/Command/.distfiles
+++ b/Completion/Mandriva/Command/.distfiles
@@ -1,5 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_urpmi
-_rebootin
'
diff --git a/Completion/Redhat/.distfiles b/Completion/Redhat/.distfiles
index 9e276f99b..f03668b3a 100644
--- a/Completion/Redhat/.distfiles
+++ b/Completion/Redhat/.distfiles
@@ -1,3 +1,2 @@
DISTFILES_SRC='
-.distfiles
'
diff --git a/Completion/Redhat/Command/.distfiles b/Completion/Redhat/Command/.distfiles
index 8f8a5da63..f03668b3a 100644
--- a/Completion/Redhat/Command/.distfiles
+++ b/Completion/Redhat/Command/.distfiles
@@ -1,5 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_rpm
-_yum
'
diff --git a/Completion/Solaris/Command/.distfiles b/Completion/Solaris/Command/.distfiles
index a900851aa..f03668b3a 100644
--- a/Completion/Solaris/Command/.distfiles
+++ b/Completion/Solaris/Command/.distfiles
@@ -1,28 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_beadm
-_coreadm
-_dhcpinfo
-_dladm
-_dtrace
-_dumpadm
-_flowadm
-_fmadm
-_gcore
-_inetadm
-_ipadm
-_netstat
-_pfexec
-_pkg5
-_prstat
-_ps
-_ptree
-_savecore
-_snoop
-_svcadm
-_svccfg
-_svcprop
-_svcs
-_zlogin
-_zoneadm
'
diff --git a/Completion/Solaris/Type/.distfiles b/Completion/Solaris/Type/.distfiles
index 2f937ee13..f03668b3a 100644
--- a/Completion/Solaris/Type/.distfiles
+++ b/Completion/Solaris/Type/.distfiles
@@ -1,6 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_be_name
-_svcs_fmri
-_zones
'
diff --git a/Completion/Unix/.distfiles b/Completion/Unix/.distfiles
index 9e276f99b..f03668b3a 100644
--- a/Completion/Unix/.distfiles
+++ b/Completion/Unix/.distfiles
@@ -1,3 +1,2 @@
DISTFILES_SRC='
-.distfiles
'
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles
index fe810e1c4..f03668b3a 100644
--- a/Completion/Unix/Command/.distfiles
+++ b/Completion/Unix/Command/.distfiles
@@ -1,278 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_a2ps
-_aap
-_adb
-_ant
-_antiword
-_apachectl
-_apm
-_arp
-_arping
-_at
-_attr
-_awk
-_baz
-_bison
-_bittorrent
-_bogofilter
-_bpython
-_bzip2
-_bzr
-_cal
-_calendar
-_cat
-_ccal
-_cdcd
-_cdrdao
-_cdrecord
-_chkconfig
-_chmod
-_chown
-_clay
-_comm
-_compress
-_configure
-_cowsay
-_cp
-_cpio
-_cplay
-_cssh
-_cut
-_cvs
-_darcs
-_date
-_dbus
-_dd
-_devtodo
-_df
-_dhclient
-_dict
-_diff
-_diffstat
-_django
-_dmidecode
-_du
-_dvi
-_ecasound
-_elinks
-_elm
-_enscript
-_env
-_espeak
-_etags
-_fakeroot
-_feh
-_fetchmail
-_ffmpeg
-_figlet
-_find
-_finger
-_flasher
-_flex
-_fortune
-_fsh
-_fuser
-_gcc
-_gdb
-_genisoimage
-_getconf
-_getent
-_getfacl
-_getmail
-_git
-_global
-_gnu_generic
-_gnupod
-_gnutls
-_go
-_gpg
-_gphoto2
-_gprof
-_gradle
-_graphicsmagick
-_grep
-_groff
-_growisofs
-_gs
-_guilt
-_gzip
-_hg
-_iconv
-_id
-_ifconfig
-_iftop
-_imagemagick
-_init_d
-_initctl
-_ip
-_irssi
-_ispell
-_java
-_joe
-_join
-_killall
-_knock
-_kvno
-_last
-_ldd
-_less
-_lha
-_links
-_ln
-_loadkeys
-_locate
-_look
-_lp
-_ls
-_lsof
-_lynx
-_lzop
-_mail
-_make
-_man
-_md5sum
-_mencal
-_metaflac
-_mh
-_mkdir
-_module
-_monotone
-_moosic
-_mosh
-_mount
-_mpc
-_mt
-_mtools
-_mtr
-_mutt
-_mysql_utils
-_mysqldiff
-_ncftp
-_netcat
-_nice
-_nkf
-_nm
-_nmap
-_notmuch
-_npm
-_nslookup
-_od
-_pack
-_patch
-_pax
-_pbm
-_perforce
-_perl
-_perldoc
-_pgrep
-_php
-_pine
-_ping
-_pkg-config
-_pkg_instance
-_pkgadd
-_pkginfo
-_pkgrm
-_pon
-_postfix
-_prcs
-_printenv
-_prove
-_psutils
-_pump
-_pydoc
-_python
-_qemu
-_quilt
-_raggle
-_rake
-_ranlib
-_rar
-_rcs
-_renice
-_ri
-_rlogin
-_rm
-_rrdtool
-_rsync
-_rubber
-_ruby
-_sablotron
-_samba
-_sccs
-_screen
-_sed
-_service
-_setfacl
-_sh
-_showmount
-_sisu
-_slrn
-_socket
-_sort
-_spamassassin
-_sqlite
-_sqsh
-_ssh
-_stgit
-_strip
-_stty
-_su
-_subversion
-_sudo
-_surfraw
-_sysctl
-_systemd
-_tar
-_tardy
-_tcpdump
-_tcptraceroute
-_telnet
-_tex
-_texinfo
-_tidy
-_tiff
-_tin
-_tla
-_tmux
-_todo.sh
-_toilet
-_topgit
-_totd
-_tracepath
-_tree
-_twidge
-_twisted
-_unace
-_uname
-_unexpand
-_uniq
-_unison
-_units
-_user_admin
-_uzbl
-_vcsh
-_vim
-_vorbis
-_vorbiscomment
-_vux
-_w3m
-_webbrowser
-_wget
-_whereis
-_whois
-_wiggle
-_xargs
-_xmlsoft
-_xmms2
-_xz
-_yafc
-_yodl
-_yp
-_zcat
-_zdump
-_zfs
-_zip
-_zpool
'
diff --git a/Completion/Unix/Command/_chsh b/Completion/Unix/Command/_chsh
new file mode 100644
index 000000000..97552e3ac
--- /dev/null
+++ b/Completion/Unix/Command/_chsh
@@ -0,0 +1,40 @@
+#compdef chsh chpass
+case $OSTYPE in
+(darwin*|*bsd*)
+ _arguments : \
+ '-s[Specify user login shell]:shell:(${(Z+Cn+)"$(</etc/shells)"})' \
+ "-l[Specify location of user]:node:" \
+ "-u[Specify authentication name]:auth user:" \
+ "1:user name:_users"
+ ;;
+(linux-gnu)
+ if { =chsh -v } >&/dev/null
+ then
+ local -a opts shells
+ shells=( $(=chsh -l) )
+ _arguments : \
+ "(-)-s[Specify your login shell]:shell:($shells)" \
+ "(-)--shell[Specify your login shell]:shell:($shells)" \
+ "(-)-l[Print shells in /etc/shells]" \
+ "(-)--list-shells[Print shells in /etc/shells]" \
+ "(-)-u[Print a usage message and exit]" \
+ "(-)--help[Print a usage message and exit]" \
+ "(-)-v[Print version information and exit]" \
+ "(-)--version[Print version information and exit]" \
+ "1:user name:_users"
+ return
+ fi
+ # else fall through
+ ;&
+(*)
+ local s=''
+ # Use $s to cause all options to be treated as mutually exclusive
+ [[ $words[CURRENT-1] = -* ]] && s="(-)$words[CURRENT-1]"
+ # This fiddling with $s is a hack to cause "_arguments : --" to use
+ # the /etc/shells listing for -s or --shell even when the description
+ # of that option has been pulled from the GNU --help output.
+ [[ $words[CURRENT-1] = (-s|--shell) ]] &&
+ s="$s"'[ ]:shell:(${(Z+Cn+)"$(</etc/shells)"})'
+ _arguments : $s "1:user name:_users" --
+ ;;
+esac
diff --git a/Completion/Unix/Command/_dsh b/Completion/Unix/Command/_dsh
new file mode 100644
index 000000000..688e024ce
--- /dev/null
+++ b/Completion/Unix/Command/_dsh
@@ -0,0 +1,33 @@
+#compdef dsh
+
+local curcontext="$curcontext" state line expl
+typeset -A opt_args
+
+_arguments -s -C -S \
+ '(-v --verbose -q --quiet)'{-v,--verbose}'[verbose output]' \
+ '(-q --quiet -v --verbose)'{-q,--quiet}'[quieter output]' \
+ '(-M --show-machine-names)'{-M,--show-machine-names}'[prepend the host name on output]' \
+ '(-i --duplicate-input)'{-i,--duplicate-input}'[duplicate input given to dsh]' \
+ '(-b --bufsize)'{-b,--bufsize}'[change buffer size used in input duplication]:buffer size for -i (bytes)' \
+ '(-m --machine)'{-m,--machine}'[execute on machine]:machine:{_hosts || _user_at_host}' \
+ '(-n --num-topology)'{-n,--num-topology}'[how to divide the machines]:number' \
+ '(-a --all)'{-a,--all}'[execute on all machines]' \
+ '(-g --group)'{-g,--group}'[execute on group member]:groupname:->groups' \
+ '(-f --file)'{-f,--file}'[use the file as list of machines]:file:_files' \
+ '(-r --remoteshell)'{-r,--remoteshell}'[execute using shell]:remote shell:(rsh ssh)' \
+ '(-o --remoteshellopt)'{-o,--remoteshellopt}'[option to give to remote shell ]:option' \
+ '(-)'{-h,--help}'[display help information]' \
+ '(-w --wait-shell -c --concurrent-shell)'{-w,--wait-shell}'[sequentially execute shell]' \
+ '(-c --concurrent-shell -w --wait-shell)'{-c,--concurrent-shell}'[execute shell concurrently]' \
+ '(-F --forklimit)'{-F,--forklimit}'[concurrent with limit on number]:fork limit' \
+ '(-)'{-V,--version}'[display version information]' \
+ '*::args: _normal' && return
+
+if [[ $state = groups ]]; then
+ if ! zstyle -s ":completion:$curcontext:dsh-groups" dsh-groups grp; then
+ [[ -e ~/.dsh/group ]] && grp="~/.dsh/group" || return 1
+ fi
+ _path_files -W ~/.dsh/group && return
+fi
+
+return 1
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 7cd3324a8..b1f411a5e 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -6224,8 +6224,8 @@ __git_setup_merge_options () {
'--ff-only[refuse to merge unless HEAD is up to date or merge can be resolved as a fast-forward]'
'*'{-s,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies'
'*'{-X,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]'
- '(--verify-signatures)--no-verify-signatures[verify the commits being merged or abort]'
- '(--no-verify-signatures)--verify-signatures[do not verify the commits being merged]'
+ '(--verify-signatures)--verify-signatures[verify the commits being merged or abort]'
+ '(--no-verify-signatures)--no-verify-signatures[do not verify the commits being merged]'
'(-q --quiet -v --verbose)'{-q,--quiet}'[suppress all output]'
'(-q --quiet -v --verbose)'{-v,--verbose}'[output additional information]')
}
diff --git a/Completion/Unix/Command/_mosh b/Completion/Unix/Command/_mosh
index c940f9015..dacbd1018 100644
--- a/Completion/Unix/Command/_mosh
+++ b/Completion/Unix/Command/_mosh
@@ -1,12 +1,26 @@
#compdef mosh
+local curcontext="$curcontext" state line
+local -a suf
+
_arguments \
- '--client=:client helper:_command_names -e' \
- '--server=:server helper:_files' \
- '--ssh=:ssh command to run:_files' \
- '(-a -n)--predict=:when:(adaptive always never)' \
- '(--predict -n)-a[predict always]' \
- '(--predict -a)-n[predict never]' \
- {-p,--port=}':port:_ports' \
- ':remote:_hosts' \
- ':remote command:_command_names -e'
+ '(-)--help[display help information]' \
+ '(-)--version[display version information]' \
+ "--no-init[don't set terminal init string]" \
+ '--ssh=[specify ssh command to setup session]:ssh command:_normal' \
+ '--port=[specify server-side port range]:port:_sequence -n 2 -s \: _ports' \
+ '(-a -n)--predict=[control speculative local echo]:mode:(adaptive always never)' \
+ '(--predict -n)-a[synonym for --predict=always]' \
+ '(--predict -a)-n[synonym for --predict=never]' \
+ '--server[specify command to run server helper]:remote file:_files' \
+ '--client[specify command to run client helper]:_command_names -e' \
+ '1:remote host name:->userhost' \
+ '*:::args:_normal' && return
+
+case $state in
+ userhost)
+ _hosts || _user_at_host && return
+ ;;
+esac
+
+return 1
diff --git a/Completion/Unix/Command/_mount b/Completion/Unix/Command/_mount
index 542154a58..04282225f 100644
--- a/Completion/Unix/Command/_mount
+++ b/Completion/Unix/Command/_mount
@@ -688,7 +688,7 @@ if [[ "$service" = mount ]]; then
"($excl -r -w --rw)"{-w,--rw}'[mount read/write]'
"($excl)-L+[mount partition with specified label]:label:->labels"
"($excl)-U+[mount partition with specified uuid]:uuid"
- "($excl -t --types)"{-t+,--types=}'[specify file system type]:file system type:->fslist'
+ "($excl -t --types)"{-t+,--types=}'[specify file system type]:file system type:_sequence -s , _file_systems'
"($excl -O --test-opts)"{-O+,--test-opts=}'[with -a, restrict filesystems by options]:file system option:->fsopt'
"($excl -a -O -o --options)"{-o+,--options=}'[specify file system options]:file system option:->fsopt'
'(: -)'{-B,--bind}'[remount part of filesystem elsewhere]:old directory:_directories:new directory:_directories'
@@ -743,7 +743,7 @@ if [[ "$service" = mount ]]; then
'-o[specify file system options]:file system option:->fsopt'
'-p[print mounted file systems]'
'-r[mount readonly]'
- '-t[specify file system type]:file system type:->fslist'
+ '-t[specify file system type]:file system type:_sequence -s, _file_systems'
'-u[change status of already mounted filesystem]'
'-v[verbose mode]'
'-w[mount read/write]'
@@ -817,7 +817,7 @@ else
'-A[unmount all mounted file systems except the root]'
'-f[force unmount]'
'-h[unmount all filesystems associated with host]:host:_hosts'
- '-t[unmount all filesystems of specified type]:file system type:->fslist'
+ '-t[unmount all filesystems of specified type]:file system type:_sequence -s, _file_systems'
'-v[verbose mode]'
'*:dev or dir:->udevordir'
)
@@ -846,11 +846,6 @@ else
fi
case "$state" in
-fslist)
- compset -P '*,'
- compset -S ',*' || suf=','
- _file_systems -qS "$suf"
-;;
fsopt)
_tags options || return 1
diff --git a/Completion/Unix/Command/_nm b/Completion/Unix/Command/_nm
index 3ceb8c932..6c95a0d85 100644
--- a/Completion/Unix/Command/_nm
+++ b/Completion/Unix/Command/_nm
@@ -1,30 +1,62 @@
#compdef nm
-# This is a stub. It's main reason for existence is to offer
-# object files with nm. Feel free to extend it. If you do, remove
-# this comment.
+local args files
-local state context line expl
-local -A opt_args
-local -a args
-integer ret=1
+_nm_object_file() {
+ [[ -x $REPLY || $REPLY = *.([ao]|so) ]]
+}
-if _pick_variant gnu='Free Soft' unix --version; then
- args+=(-s --)
-fi
-args+=('*:file:->file')
-
-_arguments "$args[@]" && ret=0
+files="*:object file:_path_files -g '*(-.e:_nm_object_file:)'"
+args=(
+ '(-A -o --print-file-name)'{-A,-o,--print-file-name}'[print name of input file on each line]'
+ '(--demangle)-C[decode symbol names]'
+ '(-D --dynamic)'{-D,--dynamic}'[display dynamic symbols instead of normal ones]'
+ '(-g --extern-only)'{-g,--extern-only}'[display only global symbols]'
+ '(-t --radix -o -x)'{-t,--radix}'[specify radix for numeric values]:radix:((d\:decimal o\:octal x\:hexadecimal))'
+)
-case $state in
- (file)
- _alternative \
- "object-files:object file:_path_files -g '*.o'" \
- "executable-files:executable file:_path_files -g '*(*)'" \
- "dynamic-libraries:dynamic library:_path_files -g '*.so(.*)#'" \
- "static-libraries:static library:_path_files -g '*.a'" \
- "directories:directory:_path_files -g '*(/)'" && ret=0
- ;;
-esac
+if _pick_variant gnu=GNU unix -V; then
+ compset -P '@' && files='*:options file:_files'
+ args+=(
+ '(- *)--help[display help information]'
+ '(- *)--version[display version information]'
+ '(-f --format -P --portability)-B[same as --format=bsd]'
+ '(-C --no-demangle)--demangle=-[decode symbol names]::style:(auto gnu lucid arm hp edg gnu-v3 java gnat)'
+ "(-C --demangle)--no-demangle[don't decode symbol names]"
+ '(-u --undefined-only)--defined-only[display only defined symbols]'
+ '(-f --format -P)'{-f+,--format=}'[specify output format]:format:(bsd sysv posix)'
+ '(-l --line-numbers)'{-l,--line-numbers}'[display source file and line numbers from debug information]'
+ '(-n --numeric-sort -p --no-sort --size-sort)'{-n,--numeric-sort}'[sort symbols numerically by address]'
+ '(-p --no-sort -n --numeric-sort -r -P --reverse-sort --size-sort)'{-p,--no-sort}'[do not sort symbols]'
+ '(-P --portability -B -f --format)'{-P,--portability}'[same as --format=posix]'
+ '(-r --reverse-sort -p --no-sort --size-sort)'{-r,--reverse-sort}'[reverse sort order]'
+ '--plugin[load specified plugin]:plugin'
+ '(-u --undefined-only --defined-only)'{-u,--undefined-only}'[display only undefined symbols]'
+ "--target=[target object format]:targets:(${${(@M)${(f)$(_call_program targets nm --help)}:#*supported targets:*}##*: })"
+ '(-a --debug-syms)'{-a,--debug-syms}'[display debugger-only symbols]'
+ '(-S --print-size)'{-S,--print-size}'[print size of defined symbols]'
+ '(-s --print-armap)'{-s,--print-armap}'[include index for symbols from archive members]'
+ '(-p --no-sort -n --numeric-sort -r)--size-sort[sort symbols by size]'
+ '--special-syms[include special symbols in the output]'
+ '--synthetic[display synthetic symbols as well]'
+ )
+else
+ # following flags are accurate for Solaris
+ args=( ${args:#(|*\)(\*|))-[o-]*}
+ "-h[don't display column headers]"
+ '-l[distinguish WEAK symbols with * character]'
+ '(-t -x)-o[print values in octal]'
+ '(-v)-n[sort symbols by name]'
+ '(-P)-p[produce parsable output]'
+ '(-p)-P[portable output format]'
+ '(-r)-R[print archive name, object file and symbol name]'
+ '-r[prepend name of input file to each symbol name]'
+ '-s[print section name instead of index]'
+ '-u[print undefined symbols only]'
+ '(-n)-v[sort external symbols by value]'
+ '-V[display version of the nm command]'
+ '(-o -t)-x[print values in hexadecimal]'
+ )
+fi
-return ret
+_arguments -s "$args[@]" $files
diff --git a/Completion/Unix/Command/_nmap b/Completion/Unix/Command/_nmap
index f23937abc..437e68b7d 100644
--- a/Completion/Unix/Command/_nmap
+++ b/Completion/Unix/Command/_nmap
@@ -22,7 +22,7 @@ _arguments -C \
'-iR[scan random hosts]:num hosts' \
'-p[specify ports to try]:port numbers' \
'-F[scan only ports listed in services file]' \
- '-D[perform decoy scan]:host list:->host-list' \
+ '-D[perform decoy scan]:host list:_sequence -s, _hosts' \
'-S[specify source address]:address:_hosts' \
'-e[specify interface to use]:network interface:_net_interfaces' \
'-g[specify source port number]:port number' \
diff --git a/Completion/Unix/Command/_pgrep b/Completion/Unix/Command/_pgrep
index 3b180ab2d..95d0ea284 100644
--- a/Completion/Unix/Command/_pgrep
+++ b/Completion/Unix/Command/_pgrep
@@ -70,13 +70,9 @@ _arguments -s -w $arguments && ret=0
case $state in
(tty)
- compset -P '*,'
-
- local -a used ttys
- used=(${(s:,:)IPREFIX})
-
+ local -a ttys
ttys=( /dev/tty*(N) /dev/pts/*(N) )
- _wanted tty expl 'terminal device' compadd -S ',' -q -F used ${ttys#/dev/}
+ _sequence -s , _wanted tty expl 'terminal device' compadd - ${ttys#/dev/}
;;
(sid)
diff --git a/Completion/Unix/Command/_rsync b/Completion/Unix/Command/_rsync
index a531d7df6..7bad03a05 100644
--- a/Completion/Unix/Command/_rsync
+++ b/Completion/Unix/Command/_rsync
@@ -74,7 +74,8 @@ _rsync() {
_arguments -s \
'*'{-v,--verbose}'[increase verbosity]' \
{--no-v,--no-verbose}'[turn off --verbose]' \
- '--bwlimit=[limit I/O bandwidth]:KBytes (etc.) per second' \
+ '--bwlimit=[limit I/O bandwidth]:limit (KiB per second)' \
+ '--outbuf=[set output buffering]:buffering:(none line block)' \
'--port=[specify alternate port number]:port:(873)' \
'--address=[bind to the specified address]:bind address:_bind_addresses' \
'(-T --temp-dir)'{-T,--temp-dir=}'[create temporary files in specified directory]:directory:_directories' \
@@ -213,6 +214,7 @@ _rsync() {
'--protocol=[force an older protocol version to be used]:number' \
'--info=[fine-grained informational verbosity]:comma-separated list' \
'--debug=[fine-grained debug verbosity]:comma-separated list' \
+ '--msgs2stderr[special output handling for debugging]' \
'--munge-links[munge symlinks to make them safer, but unusable]' \
'--ignore-missing-args[ignore missing source args without error]' \
'--delete-missing-args[delete missing source args from destination]' \
@@ -222,6 +224,7 @@ _rsync() {
'*'{-M=,--remote-option=}'[send option to the remote side only]:option string' \
'--preallocate[preallocate the full length of new files]' \
'--iconv=[request charset conversion of filenames]:number' \
+ '--checksum-seed=:number' \
'--read-batch=[read a batched update from the specified file]:file:_files'
}
diff --git a/Completion/Unix/Command/_wget b/Completion/Unix/Command/_wget
index f709a0830..b8ca2fd93 100644
--- a/Completion/Unix/Command/_wget
+++ b/Completion/Unix/Command/_wget
@@ -14,6 +14,7 @@ _arguments -C -s \
'(--quiet -q --verbose -v --no-verbose -nv)'{--quiet,-q}'[turn off output]' \
'(--quiet -q --verbose -v --no-verbose -nv)'{--verbose,-v}'[turn on verbose output]' \
'*-n+[turn off flags]:flags:->noflags' \
+ '--report-speed=:type:(bits)' \
'(--input-file -i)'{--input-file=,-i+}'[specify input file]:file containing URLs:_files' \
'(--force-html -F)'{--force-html,-F}'[treat input file as html]' \
'(--base -B)'{--base=,-B+}'[prepend URL to relative links]:base URL:_urls' \
@@ -47,6 +48,7 @@ _arguments -C -s \
'--prefer-family[connect first to addresses of specified family]:address family:(IPv6 IPv4 none)' \
'(--http-user --ftp-user)--user[set both ftp and http user]:user' \
'(--http-password --ftp-password)--password[set both ftp and http password]:password' \
+ '(--password --http-password --ftp-password)--ask-password:[prompt for passwords]' \
'--no-iri[turn off IRI support]' \
'--local-encoding=[specify local encoding for IRIs]:encoding' \
'--remote-encoding=[specify default remote encoding]:encoding' \
@@ -56,12 +58,13 @@ _arguments -C -s \
'(--directory-prefix -P)'{--directory-prefix=,-P+}'[specify prefix to save files to]:prefix:_files -/' \
'--cut-dirs=:number:' \
'(--user)--http-user=:user' \
- '(--password)--http-password=:password' \
+ '(--password --ask-password)--http-password=:password' \
'--no-cache[disallow server-cached data]' \
'--default-page=[specify default page name, normally index.html]' \
'(--adjust-extension -E)'{--adjust-extension,-E}'[save all HTML/CSS documents with proper extensions]' \
"--ignore-length[ignore \`Content-Length' header field]" \
'*--header=:string' \
+ '--max-redirect=:number' \
'--proxy-user=:user' \
'--proxy-password=:password' \
'--referer=:URL:_urls' \
@@ -74,9 +77,14 @@ _arguments -C -s \
'--keep-session-cookies[load and save session cookies]' \
'--post-data=[use the POST method with specified data]:data to send' \
'--post-file=[use the POST method; sending contents of a file]:file:_files' \
+ '--method=[use specified HTTP method]:method:(GET POST HEAD DELETE)' \
+ '(--body-file)--body-data=[send string as data]:string' \
+ '(--body-data)--body-file=[send contents of file]:file:_files' \
'--content-disposition[honor the Content-Disposition header when choosing local file names]' \
+ '--content-on-error[output received content on server errors]' \
"--auth-no-challenge[send basic HTTP authentication without first waiting for server's challenge]" \
'--secure-protocol=[choose secure protocol]:protocol:(SSLv2 SSLv3 TLSv1)' \
+ --https-only \
"--no-check-certificate=[don't check the server certificate]" \
'--certificate=[specify client certificate]:client certificate file:_files' \
'--certificate-type=[specify client certificate type]:certificate type:(PEM DER)' \
@@ -87,22 +95,27 @@ _arguments -C -s \
'--random-file[specify file with random data for seeding generator]:file:_files' \
'--egd-file=[specify filename of EGD socket]:file:_files' \
'(--user)--ftp-user=:user' \
- '(--password)--ftp-password=:password' \
+ '(--password --ask-password)--ftp-password=:password' \
"--no-remove-listing[don't remove \`.listing' files]" \
'--no-glob[turn off FTP file name globbing]' \
'--no-passive-ftp' \
- '--retr-symlinks' \
'--preserve-permissions[preserve remote file permissions with ftp]' \
+ '--retr-symlinks' \
+ '--warc-file=:file:_files' --warc-header=:string --warc-max-size=:number \
+ --warc-cdx --warc-dedup=:file:_files --no-warc-compression --no-warc-digests \
+ --no-warc-keep-log --warc-tempdir=:directory:_directories \
'(--recursive -r)'{--recursive,-r}'[recurse subdirectories]' \
'(--level -l)'{--level=,-l+}'[specify maximum recursion depth]:level' \
'--delete-after' \
'(--convert-links -k)'{--convert-links,-k}'[convert links to be relative]' \
+ '--backups=:max backups' \
'(--backup-converted -K)'{--backup-converted,-K}'[backup files before conversion]' \
'(--mirror -m -r -N -l)'{--mirror,-m}'[mirror (-r -N -l inf --no-remove-listing)]' \
'(--page-requisites -p)'{--page-requisites,-p}'[get all images needed to display page]' \
'--strict-comments[turn on strict (SGML) handling of HTML comments]' \
'(--accept -A)'{--accept=,-A+}'[specify accepted extensions]:extensions' \
'(--reject -R)'{--reject=,-R+}'[specify rejected extensions]:extensions' \
+ --{accept,reject}-regex=:regex '--regex-type=:regex type:(posix pcre)' \
'(--domains -D)'{--domains=,-D+}'[specify accepted domains]:domains:_domains' \
'--exclude-domains=:rejected domains:_domains' \
'--follow-ftp' \
diff --git a/Completion/Unix/Command/_zip b/Completion/Unix/Command/_zip
index a6baa9757..171daf01e 100644
--- a/Completion/Unix/Command/_zip
+++ b/Completion/Unix/Command/_zip
@@ -104,11 +104,8 @@ fi
case $state in
suffixes)
- compset -P '*:'
- compset -S ':*' || suf=":."
suffixes=( *.*(N:e) )
- _wanted suffixes expl suffixes \
- compadd -S "$suf" -r ": \t" .$^suffixes && return
+ _sequence -s : _wanted -x suffixes expl suffix compadd - .$^suffixes && return
;;
files)
if [[ $service = zip ]] && (( ! ${+opt_args[-d]} )); then
diff --git a/Completion/Unix/Type/.distfiles b/Completion/Unix/Type/.distfiles
index ea0baa7c7..f03668b3a 100644
--- a/Completion/Unix/Type/.distfiles
+++ b/Completion/Unix/Type/.distfiles
@@ -1,56 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_arch_archives
-_arch_namespace
-_bind_addresses
-_canonical_paths
-_ctags_tags
-_dict_words
-_diff_options
-_dir_list
-_directories
-_domains
-_email_addresses
-_file_systems
-_files
-_global_tags
-_groups
-_have_glob_qual
-_hosts
-_java_class
-_ld_debug
-_list_files
-_locales
-_mailboxes
-_mime_types
-_my_accounts
-_net_interfaces
-_newsgroups
-_other_accounts
-_path_commands
-_path_files
-_pdf
-_perl_basepods
-_perl_modules
-_pids
-_ports
-_postscript
-_printers
-_ps1234
-_pspdf
-_remote_files
-_services
-_signals
-_tar_archive
-_terminals
-_texi
-_tilde_files
-_time_zone
-_urls
-_user_at_host
-_users
-_users_on
-_zfs_dataset
-_zfs_keysource_props
-_zfs_pool
'
diff --git a/Completion/Unix/Type/_pids b/Completion/Unix/Type/_pids
index 3f99dfdf0..3c6a76561 100644
--- a/Completion/Unix/Type/_pids
+++ b/Completion/Unix/Type/_pids
@@ -20,25 +20,30 @@ else
nm="$compstate[nmatches]"
fi
-out=( "${(@f)$(_call_program processes ps 2>/dev/null)}" )
-desc="$out[1]"
-out=( "${(@M)out[2,-1]:#${~match}}" )
-
-if [[ "$desc" = (#i)(|*[[:blank:]])pid(|[[:blank:]]*) ]]; then
- pids=( "${(@)${(@M)out#${(l.${#desc[1,(r)(#i)[[:blank:]]pid]}..?.)~:-}[^[:blank:]]#}##*[[:blank:]]}" )
-else
- pids=( "${(@)${(@M)out##[^0-9]#[0-9]#}##*[[:blank:]]}" )
-fi
-
-if zstyle -T ":completion:${curcontext}:processes" verbose; then
- list=( "${(@Mr:COLUMNS-1:)out}" )
- desc=(-ld list)
-else
- desc=()
-fi
-
-_wanted -V processes expl 'process ID' \
- compadd "$@" "$desc[@]" "$all[@]" -a - pids && ret=0
+while _tags; do
+ if _requested processes; then
+ while _next_label processes expl 'process ID'; do
+ out=( "${(@f)$(_call_program $curtag ps 2>/dev/null)}" )
+ desc="$out[1]"
+ out=( "${(@M)out[2,-1]:#${~match}}" )
+
+ if [[ "$desc" = (#i)(|*[[:blank:]])pid(|[[:blank:]]*) ]]; then
+ pids=( "${(@)${(@M)out#${(l.${#desc[1,(r)(#i)[[:blank:]]pid]}..?.)~:-}[^[:blank:]]#}##*[[:blank:]]}" )
+ else
+ pids=( "${(@)${(@M)out##[^0-9]#[0-9]#}##*[[:blank:]]}" )
+ fi
+
+ if zstyle -T ":completion:${curcontext}:$curtag" verbose; then
+ list=( "${(@Mr:COLUMNS-1:)out}" )
+ desc=(-ld list)
+ else
+ desc=()
+ fi
+ compadd "$@" "$expl[@]" "$desc[@]" "$all[@]" -a pids && ret=0
+ done
+ fi
+ (( ret )) || break
+done
if [[ -n "$all" ]]; then
zstyle -s ":completion:${curcontext}:processes" insert-ids out || out=menu
diff --git a/Completion/Unix/Type/_users b/Completion/Unix/Type/_users
index 5ab8dbc55..3c8c7027b 100644
--- a/Completion/Unix/Type/_users
+++ b/Completion/Unix/Type/_users
@@ -1,4 +1,4 @@
-#compdef passwd groups userdel chage chfn chsh
+#compdef passwd groups userdel chage chfn
local expl users
diff --git a/Completion/X/.distfiles b/Completion/X/.distfiles
index 9e276f99b..f03668b3a 100644
--- a/Completion/X/.distfiles
+++ b/Completion/X/.distfiles
@@ -1,3 +1,2 @@
DISTFILES_SRC='
-.distfiles
'
diff --git a/Completion/X/Command/.distfiles b/Completion/X/Command/.distfiles
index c6835ea54..f03668b3a 100644
--- a/Completion/X/Command/.distfiles
+++ b/Completion/X/Command/.distfiles
@@ -1,36 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_acroread
-_dcop
-_gnome-gv
-_gqview
-_gv
-_kfmclient
-_matlab
-_mozilla
-_mplayer
-_nautilus
-_nedit
-_netscape
-_okular
-_pdftk
-_qiv
-_setxkbmap
-_urxvt
-_vnc
-_x_utils
-_xauth
-_xclip
-_xdvi
-_xfig
-_xloadimage
-_xmodmap
-_xournal
-_xpdf
-_xscreensaver
-_xset
-_xterm
-_xv
-_xwit
-_xrandr
'
diff --git a/Completion/X/Type/.distfiles b/Completion/X/Type/.distfiles
index fa5c16ce0..f03668b3a 100644
--- a/Completion/X/Type/.distfiles
+++ b/Completion/X/Type/.distfiles
@@ -1,10 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_x_borderwidth _x_font _x_resource
-_x_color _x_geometry _x_selection_timeout
-_x_colormapid _x_keysym _x_title
-_x_cursor _x_locale _x_window
-_x_display _x_modifier _xt_session_id
-_x_extension _x_name _x_visual
-_xft_fonts
'
diff --git a/Completion/X/Utility/.distfiles b/Completion/X/Utility/.distfiles
index 44337f471..f03668b3a 100644
--- a/Completion/X/Utility/.distfiles
+++ b/Completion/X/Utility/.distfiles
@@ -1,4 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_x_arguments _xt_arguments
'
diff --git a/Completion/Zsh/.distfiles b/Completion/Zsh/.distfiles
index 9e276f99b..f03668b3a 100644
--- a/Completion/Zsh/.distfiles
+++ b/Completion/Zsh/.distfiles
@@ -1,3 +1,2 @@
DISTFILES_SRC='
-.distfiles
'
diff --git a/Completion/Zsh/Command/.distfiles b/Completion/Zsh/Command/.distfiles
index bf780a2a0..f03668b3a 100644
--- a/Completion/Zsh/Command/.distfiles
+++ b/Completion/Zsh/Command/.distfiles
@@ -1,51 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_alias
-_bindkey
-_builtin
-_cd
-_command
-_compdef
-_dirs
-_disable
-_echotc
-_echoti
-_emulate
-_enable
-_fc
-_hash
-_jobs_builtin
-_kill
-_limit
-_mere
-_precommand
-_print
-_prompt
-_read
-_run-help
-_sched
-_set
-_setopt
-_source
-_stat
-_tcpsys
-_trap
-_ttyctl
-_typeset
-_ulimit
-_unhash
-_unsetopt
-_vared
-_wait
-_which
-_zattr
-_zcompile
-_zed
-_zftp
-_zle
-_zmodload
-_zmv
-_zpty
-_zstyle
-_ztodo
'
diff --git a/Completion/Zsh/Command/_kill b/Completion/Zsh/Command/_kill
index 5e52a99de..b9dfde3f0 100644
--- a/Completion/Zsh/Command/_kill
+++ b/Completion/Zsh/Command/_kill
@@ -1,6 +1,7 @@
#compdef kill
local curcontext="$curcontext" line state ret=1
+typeset -A opt_args
_arguments -C \
'(-s -l 1)-n[specify signal number]:signal number' \
@@ -10,9 +11,12 @@ _arguments -C \
'*:processes:->processes' && ret=0
if [[ -n "$state" ]]; then
+ local pgrp='process-groups:: _wanted '
+ [[ -n "$opt_args[(i)-[ns]]${${(@)line:#--}}" && -prefix - ]] && pgrp+='-x '
+ pgrp+="process-groups expl 'process-group' compadd - 0"
_alternative \
'processes:: _pids' \
- 'jobs:: _jobs -t' && ret=0
+ 'jobs:: _jobs -t' $pgrp && ret=0
fi
return ret
diff --git a/Completion/Zsh/Context/.distfiles b/Completion/Zsh/Context/.distfiles
index 1537229f8..f03668b3a 100644
--- a/Completion/Zsh/Context/.distfiles
+++ b/Completion/Zsh/Context/.distfiles
@@ -1,19 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_assign
-_autocd
-_brace_parameter
-_condition
-_default
-_dynamic_directory_name
-_equal
-_first
-_in_vared
-_math
-_parameter
-_redirect
-_subscript
-_tilde
-_value
-_zcalc_line
'
diff --git a/Completion/Zsh/Function/.distfiles b/Completion/Zsh/Function/.distfiles
index 20b5dc6a6..f03668b3a 100644
--- a/Completion/Zsh/Function/.distfiles
+++ b/Completion/Zsh/Function/.distfiles
@@ -1,5 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_zargs
-_zsh-mime-handler
'
diff --git a/Completion/Zsh/Type/.distfiles b/Completion/Zsh/Type/.distfiles
index 4011353a0..f03668b3a 100644
--- a/Completion/Zsh/Type/.distfiles
+++ b/Completion/Zsh/Type/.distfiles
@@ -1,27 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_aliases
-_arrays
-_command_names
-_delimiters
-_directory_stack
-_file_descriptors
-_functions
-_globflags
-_globqual_delims
-_globquals
-_history_modifiers
-_jobs
-_jobs_bg
-_jobs_fg
-_limits
-_math_params
-_module_math_func
-_options
-_options_set
-_options_unset
-_parameters
-_suffix_alias_files
-_user_math_func
-_vars
'
diff --git a/Completion/openSUSE/Command/.distfiles b/Completion/openSUSE/Command/.distfiles
index 995d12e36..f03668b3a 100644
--- a/Completion/openSUSE/Command/.distfiles
+++ b/Completion/openSUSE/Command/.distfiles
@@ -1,8 +1,2 @@
DISTFILES_SRC='
-.distfiles
-_hwinfo
-_osc
-_SUSEconfig
-_yast2
-_zypper
'
diff --git a/Config/.distfiles b/Config/.distfiles
index d76f98841..f03668b3a 100644
--- a/Config/.distfiles
+++ b/Config/.distfiles
@@ -1,6 +1,2 @@
DISTFILES_SRC='
- .distfiles .cvsignore
- aczshoot.m4
- clean.mk config.mk defs.mk.in version.mk
- installfns.sh uninstallfns.sh
'
diff --git a/Config/version.mk b/Config/version.mk
index bc4261701..78f1490ef 100644
--- a/Config/version.mk
+++ b/Config/version.mk
@@ -27,5 +27,5 @@
# This must also serve as a shell script, so do not add spaces around the
# `=' signs.
-VERSION=5.0.5-dev-2
-VERSION_DATE='August 12, 2014'
+VERSION=5.0.5-dev-3
+VERSION_DATE='August 24, 2014'
diff --git a/Doc/.distfiles b/Doc/.distfiles
index 6c2b2119f..8c910da7b 100644
--- a/Doc/.distfiles
+++ b/Doc/.distfiles
@@ -1,11 +1,5 @@
DISTFILES_SRC='
- .cvsignore .distfiles Makefile.in
- META-FAQ.yo intro.ms
- version.yo zmacros.yo zman.yo ztexi.yo
- zsh.yo zshbuiltins.yo zshcalsys.yo
- zshcompctl.yo zshcompsys.yo zshcompwid.yo
- zshexpn.yo zshmisc.yo zshmodules.yo zshoptions.yo zshparam.yo
- zshroadmap.yo zshzftpsys.yo zshzle.yo zshcontrib.yo zshtcpsys.yo
+ version.yo
zsh.texi
zsh.1 zshbuiltins.1 zshcalsys.1
zshcompctl.1 zshcompsys.1 zshcompwid.1 zshexpn.1
diff --git a/Doc/Zsh/.distfiles b/Doc/Zsh/.distfiles
index 4f521e91c..22fd53a29 100644
--- a/Doc/Zsh/.distfiles
+++ b/Doc/Zsh/.distfiles
@@ -1,73 +1,5 @@
DISTFILES_SRC='
-.cvsignore
-.distfiles
-arith.yo
-builtins.yo
-calsys.yo
-compat.yo
-compctl.yo
-compsys.yo
-compwid.yo
-cond.yo
-contrib.yo
-exec.yo
-expn.yo
-filelist.yo
-files.yo
-ftp_sites.yo
-func.yo
-grammar.yo
-index.yo
-intro.yo
-invoke.yo
-jobs.yo
manmodmenu.yo
-manual.yo
-metafaq.yo
-mod_attr.yo
-mod_cap.yo
-mod_clone.yo
-mod_compctl.yo
-mod_complete.yo
-mod_complist.yo
-mod_computil.yo
-mod_curses.yo
-mod_datetime.yo
-mod_deltochar.yo
-mod_example.yo
-mod_files.yo
-mod_langinfo.yo
modlist.yo
-mod_mapfile.yo
-mod_mathfunc.yo
modmenu.yo
-mod_newuser.yo
-mod_parameter.yo
-mod_pcre.yo
-mod_regex.yo
-mod_sched.yo
-mod_socket.yo
-mod_stat.yo
-mod_system.yo
-mod_tcp.yo
-mod_termcap.yo
-mod_terminfo.yo
-modules.yo
-mod_zftp.yo
-mod_zleparameter.yo
-mod_zle.yo
-mod_zprof.yo
-mod_zpty.yo
-mod_zselect.yo
-mod_zutil.yo
-options.yo
-params.yo
-prompt.yo
-redirect.yo
-restricted.yo
-roadmap.yo
-seealso.yo
-tcpsys.yo
-zftpsys.yo
-zle.yo
'
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 8a9f47db1..920b5903d 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -4741,6 +4741,19 @@ This function accepts the tt(compadd) options `tt(-V)', `tt(-J)',
`tt(-r)', `tt(-R)', and `tt(-q)' and passes them on to the tt(compadd)
builtin used to add the matches.
)
+findex(_sequence)
+item(tt(_sequence) [ tt(-s) var(sep) ] [ tt(-n) var(max) ] [ tt(-d) ] var(function) [ tt(-) ] ...)(
+This function is a wrapper to other functions for completing items in a
+separated list. The same function is used to complete each item in the
+list. The separator is specified with the tt(-s) option. If tt(-s) is
+omitted it will use `tt(,)'. Duplicate values are not matched unless
+tt(-d) is specified. If there is a fixed or maximum number of items in
+the list, this can be specified with the tt(-n) option.
+
+Common tt(compadd) options are passed on to the function. It is possible
+to use tt(compadd) directly with tt(_sequence), though tt(_values) may
+be more appropriate in this situation.
+)
findex(_setup)
item(tt(_setup) var(tag) [ var(group) ])(
This function sets up the special
diff --git a/Doc/Zsh/tcpsys.yo b/Doc/Zsh/tcpsys.yo
index 1e26054ce..406785997 100644
--- a/Doc/Zsh/tcpsys.yo
+++ b/Doc/Zsh/tcpsys.yo
@@ -299,7 +299,7 @@ programme or function it is generally better to handle reading data by a
more explicit method.
)
findex(tcp_expect)
-xitem(tt(tcp_expect [ -q ] [ -p) var(var) tt(] [ -t ) var(to) tt(| -T) var(TO)tt(]))
+xitem(tt(tcp_expect [ -q ] [ -p ) var(var) tt( | -P ) var(var) tt(] [ -t ) var(to) tt(| -T) var(TO)tt(]))
item(tt( [ -a | -s) var(sess) tt(... | -l) var(sess)tt(,... ]) var(pattern) ...)(
Wait for input matching any of the given var(pattern)s from any of the
specified sessions. Input is ignored until an input line matches one of
@@ -332,7 +332,16 @@ the caller needs to know which of the patterns matched, the option tt(-p)
var(var) can be used; on return, tt($var) is set to the number of the
pattern using ordinary zsh indexing, i.e. the first is 1, and so on. Note
the absence of a `tt($)' in front of var(var). To avoid clashes, the
-parameter cannot begin with `tt(_expect)'.
+parameter cannot begin with `tt(_expect)'. The index -1 is used if
+there is a timeout and 0 if there is no match.
+
+The option tt(-P) var(var) works similarly to tt(-p), but instead of
+numerical indexes the regular arguments must begin with a prefix
+followed by a colon: that prefix is then used as a tag to which var(var)
+is set when the argument matches. The tag tt(timeout) is used if there
+is a timeout and the empty string if there is no match. Note it is
+acceptable for different arguments to start with the same prefix if the
+matches do not need to be distinguished.
The option tt(-q) is passed directly down to tt(tcp_read).
diff --git a/Doc/help/.distfiles b/Doc/help/.distfiles
index 60962adf4..6424d95f8 100644
--- a/Doc/help/.distfiles
+++ b/Doc/help/.distfiles
@@ -1,5 +1,3 @@
DISTFILES_SRC='
- .cvsignore
- .distfiles
[_a-zA-Z0-9]*
'
diff --git a/Etc/.distfiles b/Etc/.distfiles
index 8c1218e72..d5034ec2e 100644
--- a/Etc/.distfiles
+++ b/Etc/.distfiles
@@ -1,30 +1,5 @@
DISTFILES_SRC='
-.cvsignore
-.distfiles
-BUGS
-CONTRIBUTORS
-ChangeLog-3.0
-ChangeLog-3.1
-ChangeLog-4.1
-ChangeLog-4.3
FAQ
-FAQ.yo
-FTP-README
-Makefile.in
-NEWS-4.3
-STD-TODO TODO
-changelog2html.pl
-completion-style-guide
-pubring.pgp
-relnote_4.3.5.txt
-relnote_4.3.6.txt
-relnote_4.3.7.txt
-relnote_4.3.8.txt
-relnote_4.3.9.txt
-relnote_4.3.10.txt
-relnote_4.3.12.txt
-relnote_5.0.0.txt
-zsh-development-guide
'
DISTFILES_DOC='
diff --git a/Etc/.gitignore b/Etc/.gitignore
new file mode 100644
index 000000000..595541f37
--- /dev/null
+++ b/Etc/.gitignore
@@ -0,0 +1 @@
+FAQ*.html
diff --git a/Functions/.distfiles b/Functions/.distfiles
index e538ad218..f03668b3a 100644
--- a/Functions/.distfiles
+++ b/Functions/.distfiles
@@ -1,3 +1,2 @@
DISTFILES_SRC='
- .cvsignore .distfiles README.zftp
'
diff --git a/Functions/Calendar/.distfiles b/Functions/Calendar/.distfiles
index 7c14c384a..f03668b3a 100644
--- a/Functions/Calendar/.distfiles
+++ b/Functions/Calendar/.distfiles
@@ -1,14 +1,2 @@
DISTFILES_SRC='
-.distfiles
-age
-calendar
-calendar_add
-calendar_edit
-calendar_lockfiles
-calendar_parse
-calendar_read
-calendar_scandate
-calendar_show
-calendar_showdate
-calendar_sort
'
diff --git a/Functions/Chpwd/.distfiles b/Functions/Chpwd/.distfiles
index 89779a686..f03668b3a 100644
--- a/Functions/Chpwd/.distfiles
+++ b/Functions/Chpwd/.distfiles
@@ -1,9 +1,2 @@
DISTFILES_SRC='
-.distfiles
-cdr
-_cdr
-chpwd_recent_add
-chpwd_recent_dirs
-chpwd_recent_filehandler
-zsh_directory_name_cdr
'
diff --git a/Functions/Compctl/.distfiles b/Functions/Compctl/.distfiles
index d4eea91f5..f03668b3a 100644
--- a/Functions/Compctl/.distfiles
+++ b/Functions/Compctl/.distfiles
@@ -1,4 +1,2 @@
DISTFILES_SRC='
-.distfiles
-cdmatch cdmatch2 multicomp
'
diff --git a/Functions/Example/.distfiles b/Functions/Example/.distfiles
index 26cffafbf..f03668b3a 100644
--- a/Functions/Example/.distfiles
+++ b/Functions/Example/.distfiles
@@ -1,6 +1,2 @@
DISTFILES_SRC='
-.distfiles
-acx cx pushd yp zless
-cat proto randline yu zls
-zpgrep
'
diff --git a/Functions/Exceptions/.distfiles b/Functions/Exceptions/.distfiles
index 8b697438c..f03668b3a 100644
--- a/Functions/Exceptions/.distfiles
+++ b/Functions/Exceptions/.distfiles
@@ -1,4 +1,2 @@
DISTFILES_SRC='
-.distfiles
-catch throw
'
diff --git a/Functions/MIME/.distfiles b/Functions/MIME/.distfiles
index 93c13f7da..f03668b3a 100644
--- a/Functions/MIME/.distfiles
+++ b/Functions/MIME/.distfiles
@@ -1,7 +1,2 @@
DISTFILES_SRC='
-.distfiles
-pick-web-browser
-zsh-mime-contexts
-zsh-mime-handler
-zsh-mime-setup
'
diff --git a/Functions/Misc/.distfiles b/Functions/Misc/.distfiles
index 5efb17876..f03668b3a 100644
--- a/Functions/Misc/.distfiles
+++ b/Functions/Misc/.distfiles
@@ -1,34 +1,2 @@
DISTFILES_SRC='
-.distfiles
-add-zsh-hook
-allopt
-checkmail
-colors
-getjobs
-harden
-is-at-least
-mere
-nslookup
-promptnl
-regexp-replace
-relative
-run-help
-run-help-git
-run-help-openssl
-run-help-p4
-run-help-sudo
-run-help-svk
-run-help-svn
-sticky-note
-tetris
-xtermctl
-zargs
-zcalc
-zed
-zkbd
-zmathfuncdef
-zmv
-zrecompile
-zstyle+
-ztodo
'
diff --git a/Functions/Newuser/.distfiles b/Functions/Newuser/.distfiles
index 9012263a2..f03668b3a 100644
--- a/Functions/Newuser/.distfiles
+++ b/Functions/Newuser/.distfiles
@@ -1,4 +1,2 @@
DISTFILES_SRC='
-.distfiles
-zsh-newuser-install
'
diff --git a/Functions/Prompts/.distfiles b/Functions/Prompts/.distfiles
index dd18a5e41..f03668b3a 100644
--- a/Functions/Prompts/.distfiles
+++ b/Functions/Prompts/.distfiles
@@ -1,20 +1,2 @@
DISTFILES_SRC='
-.distfiles
-prompt_adam1_setup
-prompt_adam2_setup
-prompt_bart_setup
-prompt_bigfade_setup
-prompt_clint_setup
-prompt_elite2_setup
-prompt_elite_setup
-prompt_fade_setup
-prompt_fire_setup
-prompt_off_setup
-prompt_oliver_setup
-prompt_pws_setup
-prompt_redhat_setup
-prompt_special_chars
-prompt_suse_setup
-prompt_walters_setup
-prompt_zefram_setup
-promptinit'
+'
diff --git a/Functions/TCP/.distfiles b/Functions/TCP/.distfiles
index 00d37ca54..f03668b3a 100644
--- a/Functions/TCP/.distfiles
+++ b/Functions/TCP/.distfiles
@@ -1,7 +1,2 @@
DISTFILES_SRC='
-.distfiles
-tcp_command tcp_log tcp_proxy tcp_send tcp_talk
-tcp_alias tcp_expect tcp_open tcp_read tcp_sess tcp_wait
-tcp_close tcp_fd_handler tcp_output tcp_rename tcp_spam
-tcp_point tcp_shoot
'
diff --git a/Functions/TCP/tcp_expect b/Functions/TCP/tcp_expect
index 1c63b8def..eef39ad06 100644
--- a/Functions/TCP/tcp_expect
+++ b/Functions/TCP/tcp_expect
@@ -25,6 +25,15 @@
# set it to 0.
# To avoid namespace clashes, the parameter's name must
# not begin with `_expect'.
+# -P pv This is similar to -p, however in this case the
+# arguments to tcp_expect following the options are expected
+# to start with a prefix "<tag>:". The parameter $pv is
+# then set to the value "<tag>" rather than the numeric
+# index of the parameter. The string "timeout" is used
+# as the tag for a timeout specified by -t and -T and
+# on a failed match the variable is set to the empty string.
+# It is not an error for multiple arguments to have
+# the same tag or to use a reserved value of the tag.
# -q Quiet, passed down to tcp_read. Bad option and argument
# usage is always reported.
# -s sess
@@ -45,18 +54,18 @@ if [[ ${(t)SECONDS} != float* ]]; then
fi
# Variables are all named _expect_* to avoid problems with the -p param.
-local _expect_opt _expect_pvar
+local _expect_opt _expect_pvar _expect_state _expect_arg _expect_ind
local -a _expect_read_args
float _expect_to1 _expect_to_all _expect_to _expect_new_to
-integer _expect_i _expect_stat
+integer _expect_i _expect_stat _expect_states
-while getopts "al:p:qs:t:T:" _expect_opt; do
+while getopts "al:p:P:qs:t:T:" _expect_opt; do
case $_expect_opt in
(a) _expect_read_args+=(-a)
;;
(l) _expect_read_args+=(-l $OPTARG)
;;
- (p) _expect_pvar=$OPTARG
+ ([pP]) _expect_pvar=$OPTARG
if [[ $_expect_pvar != [a-zA-Z_][a-zA-Z_0-9]# ]]; then
print "invalid parameter name: $_expect_pvar" >&2
return 1
@@ -65,7 +74,12 @@ while getopts "al:p:qs:t:T:" _expect_opt; do
print "$0: parameter names staring \`_expect' are reserved."
return 1
fi
- eval "$_expect_pvar=0"
+ if [[ $_expect_opt = "P" ]]; then
+ eval "$_expect_pvar=0"
+ _expect_states=1
+ else
+ eval "$_expect_pvar="
+ fi
;;
(q) _expect_read_args+=(-q)
;;
@@ -112,8 +126,15 @@ while true; do
fi
tcp_expect_lines+=($TCP_LINE)
for (( _expect_i = 1; _expect_i <= $#; _expect_i++ )); do
- if [[ "$TCP_LINE" = ${~argv[_expect_i]} ]]; then
- [[ -n $_expect_pvar ]] && eval "$_expect_pvar=\$_expect_i"
+ if [[ _expect_states -ne 0 && $argv[_expect_i] = (#b)([^:]#):(*) ]]; then
+ _expect_ind=$match[1]
+ _expect_arg=$match[2]
+ else
+ _expect_ind=$_expect_i
+ _expect_arg=$argv[_expect_i]
+ fi
+ if [[ "$TCP_LINE" = ${~_expect_arg} ]]; then
+ [[ -n $_expect_pvar ]] && eval "$_expect_pvar=\$_expect_ind"
return 0
fi
done
diff --git a/Functions/VCS_Info/.distfiles b/Functions/VCS_Info/.distfiles
index b6e55d2fc..f03668b3a 100644
--- a/Functions/VCS_Info/.distfiles
+++ b/Functions/VCS_Info/.distfiles
@@ -1,21 +1,2 @@
DISTFILES_SRC='
-.distfiles
-vcs_info
-vcs_info_hookadd
-vcs_info_hookdel
-VCS_INFO_adjust
-VCS_INFO_bydir_detect
-VCS_INFO_check_com
-VCS_INFO_formats
-VCS_INFO_get_cmd
-VCS_INFO_hook
-vcs_info_lastmsg
-VCS_INFO_maxexports
-VCS_INFO_nvcsformats
-vcs_info_printsys
-VCS_INFO_quilt
-VCS_INFO_realpath
-VCS_INFO_reposub
-VCS_INFO_set
-vcs_info_setsys
'
diff --git a/Functions/VCS_Info/Backends/.distfiles b/Functions/VCS_Info/Backends/.distfiles
index 67fb06cda..f03668b3a 100644
--- a/Functions/VCS_Info/Backends/.distfiles
+++ b/Functions/VCS_Info/Backends/.distfiles
@@ -1,27 +1,2 @@
DISTFILES_SRC='
-.distfiles
-VCS_INFO_detect_bzr
-VCS_INFO_detect_cdv
-VCS_INFO_detect_cvs
-VCS_INFO_detect_darcs
-VCS_INFO_detect_fossil
-VCS_INFO_detect_git
-VCS_INFO_detect_hg
-VCS_INFO_detect_mtn
-VCS_INFO_detect_p4
-VCS_INFO_detect_svk
-VCS_INFO_detect_svn
-VCS_INFO_detect_tla
-VCS_INFO_get_data_bzr
-VCS_INFO_get_data_cdv
-VCS_INFO_get_data_cvs
-VCS_INFO_get_data_darcs
-VCS_INFO_get_data_fossil
-VCS_INFO_get_data_git
-VCS_INFO_get_data_hg
-VCS_INFO_get_data_mtn
-VCS_INFO_get_data_p4
-VCS_INFO_get_data_svk
-VCS_INFO_get_data_svn
-VCS_INFO_get_data_tla
'
diff --git a/Functions/Zftp/.distfiles b/Functions/Zftp/.distfiles
index c8d8f8152..f03668b3a 100644
--- a/Functions/Zftp/.distfiles
+++ b/Functions/Zftp/.distfiles
@@ -1,10 +1,2 @@
DISTFILES_SRC='
-.distfiles
-zfanon zfdir zfinit zfrglob zftype
-zfautocheck zffcache zfls zfrtime zfuget
-zfcd zfgcp zfmark zfsession zfuput
-zfcd_match zfget zfopen zfstat
-zfcget zfget_match zfparams zftp_chpwd
-zfclose zfgoto zfpcp zftp_progress
-zfcput zfhere zfput zftransfer
'
diff --git a/Functions/Zle/.distfiles b/Functions/Zle/.distfiles
index 90a07690b..f03668b3a 100644
--- a/Functions/Zle/.distfiles
+++ b/Functions/Zle/.distfiles
@@ -1,50 +1,2 @@
DISTFILES_SRC='
-.distfiles
-backward-kill-word-match
-backward-word-match
-capitalize-word-match
-copy-earlier-word
-cycle-completion-positions
-define-composed-chars
-delete-whole-word-match
-down-case-word-match
-down-line-or-beginning-search
-edit-command-line
-expand-absolute-path
-forward-word-match
-history-beginning-search-menu
-history-pattern-search
-history-search-end
-incarg
-incremental-complete-word
-insert-composed-char
-insert-files
-insert-unicode-char
-keeper
-keymap+widget
-kill-word-match
-match-word-context
-match-words-by-style
-modify-current-argument
-move-line-in-buffer
-narrow-to-region
-narrow-to-region-invisible
-predict-on
-quote-and-complete-word
-read-from-minibuffer
-replace-argument
-replace-string
-replace-string-again
-select-word-style
-send-invisible
-smart-insert-last-word
-split-shell-arguments
-transpose-lines
-transpose-words-match
-up-case-word-match
-up-line-or-beginning-search
-url-quote-magic
-which-command
-zcalc-auto-insert
-zed-set-file-name
'
diff --git a/Misc/.distfiles b/Misc/.distfiles
index d40656c0d..f03668b3a 100644
--- a/Misc/.distfiles
+++ b/Misc/.distfiles
@@ -1,7 +1,2 @@
DISTFILES_SRC='
- .distfiles
- bash2zshprompt
- c2z compctl-examples globtests globtests.ksh
- job-control-tests lete2ctl make-zsh-urls
- vcs_info-examples
'
diff --git a/NEWS b/NEWS
index 3a761b1e2..1f2a9daad 100644
--- a/NEWS
+++ b/NEWS
@@ -84,6 +84,13 @@ Changes since 5.0.0
longer array is trimmed whereas the :^^ operator repeats the shorter
array enough to match the longer array.
+- The value of $? when a job becomes stopped is now the signal number plus
+ 128, for compatibility with other shells. Note that different operating
+ systems use different values e.g. for SIGTSTP, so it is not possible in
+ portable scripts to detect stopped jobs by comparing to a fixed number.
+ Also, the value of $pipestatus is now updated when a job stops, not just
+ when it exits.
+
Changes between 4.2 and 5.0.0
-----------------------------
diff --git a/Scripts/.distfiles b/Scripts/.distfiles
index 2232f305c..f03668b3a 100644
--- a/Scripts/.distfiles
+++ b/Scripts/.distfiles
@@ -1,4 +1,2 @@
DISTFILES_SRC='
-.distfiles
-newuser
'
diff --git a/Src/.distfiles b/Src/.distfiles
index 1da58ea17..f03668b3a 100644
--- a/Src/.distfiles
+++ b/Src/.distfiles
@@ -1,53 +1,2 @@
DISTFILES_SRC='
-.cvsignore
-.distfiles
-.exrc
-.indent.pro
-Makefile.in
-Makemod.in.in
-signames1.awk
-signames2.awk
-modentry.c
-builtin.c
-compat.c
-cond.c
-exec.c
-glob.c
-hashtable.c
-hashtable.h
-hashnameddir.c
-hist.c
-init.c
-input.c
-jobs.c
-lex.c
-linklist.c
-loop.c
-main.c
-makepro.awk
-math.c
-mem.c
-mkbltnmlst.sh
-mkmakemod.sh
-module.c
-options.c
-params.c
-parse.c
-pattern.c
-prompt.c
-prototypes.h
-signals.c
-signals.h
-sort.c
-string.c
-subst.c
-text.c
-utils.c
-watch.c
-zsh.h
-zsh.mdd
-zsh_system.h
-ztype.h
-zsh.rc
-zsh.ico
'
diff --git a/Src/Builtins/.distfiles b/Src/Builtins/.distfiles
index cd36388ef..f03668b3a 100644
--- a/Src/Builtins/.distfiles
+++ b/Src/Builtins/.distfiles
@@ -1,5 +1,2 @@
DISTFILES_SRC='
- .cvsignore .distfiles .exrc
- rlimits.mdd rlimits.c rlimits.awk
- sched.mdd sched.c
'
diff --git a/Src/Modules/.distfiles b/Src/Modules/.distfiles
index 9231cecb3..f03668b3a 100644
--- a/Src/Modules/.distfiles
+++ b/Src/Modules/.distfiles
@@ -1,61 +1,2 @@
DISTFILES_SRC='
-.cvsignore
-.distfiles
-.exrc
-attr.mdd
-attr.c
-cap.mdd
-cap.c
-clone.mdd
-clone.c
-curses.mdd
-curses.c
-curses_keys.awk
-datetime.mdd
-datetime.c
-db_gdbm.mdd
-db_gdbm.c
-example.mdd
-example.c
-files.mdd
-files.c
-langinfo.mdd
-langinfo.c
-mapfile.mdd
-mapfile.c
-mathfunc.mdd
-mathfunc.c
-newuser.mdd
-newuser.c
-parameter.mdd
-parameter.c
-pcre.mdd
-pcre.c
-regex.mdd
-regex.c
-socket.mdd
-socket.c
-stat.mdd
-stat.c
-system.mdd
-system.c
-errnames1.awk
-errnames2.awk
-tcp.mdd
-tcp.c
-tcp.h
-termcap.mdd
-termcap.c
-terminfo.mdd
-terminfo.c
-zftp.mdd
-zftp.c
-zprof.mdd
-zprof.c
-zselect.mdd
-zselect.c
-zutil.mdd
-zutil.c
-zpty.mdd
-zpty.c
'
diff --git a/Src/Zle/.distfiles b/Src/Zle/.distfiles
index e280a0199..f03668b3a 100644
--- a/Src/Zle/.distfiles
+++ b/Src/Zle/.distfiles
@@ -1,14 +1,2 @@
DISTFILES_SRC='
- .cvsignore .distfiles .exrc
- comp.h complete.mdd complete.c
- compcore.c compmatch.c compresult.c
- compctl.mdd compctl.c compctl.h
- complist.mdd complist.c
- computil.mdd computil.c
- deltochar.mdd deltochar.c
- zleparameter.mdd zleparameter.c
- zle.mdd iwidgets.list zle.h zle_bindings.c zle_hist.c
- zle_keymap.c zle_main.c zle_misc.c zle_move.c zle_params.c
- zle_refresh.c zle_things.sed zle_thingy.c zle_tricky.c
- zle_utils.c zle_vi.c zle_widget.sed zle_word.c
'
diff --git a/Src/glob.c b/Src/glob.c
index 627166c7a..cb853870a 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -2219,7 +2219,7 @@ xpandbraces(LinkList list, LinkNode *np)
uremnode(list, node);
strp = str - str3;
lenalloc = strp + strlen(str2+1) + 1;
- for (; cend >= cstart; cend--) {
+ do {
#ifdef MULTIBYTE_SUPPORT
char *ncptr;
int nclen;
@@ -2239,7 +2239,7 @@ xpandbraces(LinkList list, LinkNode *np)
insertlinknode(list, last, p);
if (rev) /* decreasing: add in reverse order. */
last = nextnode(last);
- }
+ } while (cend-- > cstart);
*np = nextnode(olast);
return;
}
diff --git a/Src/jobs.c b/Src/jobs.c
index c4a0707d4..83a4d96a4 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -384,9 +384,11 @@ storepipestats(Job jn, int inforeground, int fixlastval)
Process p;
for (p = jn->procs, i = 0; p && i < MAX_PIPESTATS; p = p->next, i++) {
- jpipestats[i] = ((WIFSIGNALED(p->status)) ?
+ jpipestats[i] = (WIFSIGNALED(p->status) ?
0200 | WTERMSIG(p->status) :
- WEXITSTATUS(p->status));
+ (WIFSTOPPED(p->status) ?
+ 0200 | WEXITSTATUS(p->status) :
+ WEXITSTATUS(p->status)));
if (jpipestats[i])
pipefail = jpipestats[i];
}
@@ -436,8 +438,11 @@ update_job(Job jn)
if (WIFSTOPPED(pn->status)) /* some processes are stopped */
somestopped = 1; /* so job is not done, but entry needs updating */
if (!pn->next) /* last job in pipeline determines exit status */
- val = (WIFSIGNALED(pn->status)) ? 0200 | WTERMSIG(pn->status) :
- WEXITSTATUS(pn->status);
+ val = (WIFSIGNALED(pn->status) ?
+ 0200 | WTERMSIG(pn->status) :
+ (WIFSTOPPED(pn->status) ?
+ 0200 | WEXITSTATUS(pn->status) :
+ WEXITSTATUS(pn->status)));
if (pn->pid == jn->gleader) /* if this process is process group leader */
status = pn->status;
}
@@ -537,7 +542,7 @@ update_job(Job jn)
return;
jn->stat |= (somestopped) ? STAT_CHANGED | STAT_STOPPED :
STAT_CHANGED | STAT_DONE;
- if (jn->stat & STAT_DONE) {
+ if (jn->stat & (STAT_DONE|STAT_STOPPED)) {
/* This may be redundant with printjob() but note that inforeground
* is true here for STAT_CURSH jobs even when job != thisjob, most
* likely because thisjob = -1 from exec.c:execsimple() trickery.
diff --git a/Src/utils.c b/Src/utils.c
index 998e46a36..9109f66a7 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -716,14 +716,13 @@ slashsplit(char *s)
}
/* expands symlinks and .. or . expressions */
-/* if flag = 0, only expand .. and . expressions */
/**/
static int
xsymlinks(char *s)
{
char **pp, **opp;
- char xbuf2[PATH_MAX*2], xbuf3[PATH_MAX*2];
+ char xbuf2[PATH_MAX*3], xbuf3[PATH_MAX*2];
int t0, ret = 0;
zulong xbuflen = strlen(xbuf);
@@ -753,6 +752,7 @@ xsymlinks(char *s)
strcat(xbuf, *pp);
} else {
*xbuf = 0;
+ ret = -1;
break;
}
} else {
@@ -760,9 +760,11 @@ xsymlinks(char *s)
metafy(xbuf3, t0, META_NOALLOC);
if (*xbuf3 == '/') {
strcpy(xbuf, "");
- xsymlinks(xbuf3 + 1);
+ if (xsymlinks(xbuf3 + 1) < 0)
+ ret = -1;
} else
- xsymlinks(xbuf3);
+ if (xsymlinks(xbuf3) < 0)
+ ret = -1;
}
}
freearray(opp);
@@ -781,11 +783,10 @@ xsymlink(char *s)
if (*s != '/')
return NULL;
*xbuf = '\0';
- xsymlinks(s + 1);
- if (!*xbuf) {
+ if (xsymlinks(s + 1) < 0)
zwarn("path expansion failed, using root directory");
+ if (!*xbuf)
return ztrdup("/");
- }
return ztrdup(xbuf);
}
@@ -795,7 +796,7 @@ print_if_link(char *s)
{
if (*s == '/') {
*xbuf = '\0';
- if (xsymlinks(s + 1))
+ if (xsymlinks(s + 1) > 0)
printf(" -> "), zputs(*xbuf ? xbuf : "/", stdout);
}
}
diff --git a/StartupFiles/.distfiles b/StartupFiles/.distfiles
index 7058eddc0..f03668b3a 100644
--- a/StartupFiles/.distfiles
+++ b/StartupFiles/.distfiles
@@ -1,4 +1,2 @@
DISTFILES_SRC='
- .distfiles
- zlogin zshenv zshrc
'
diff --git a/Test/.distfiles b/Test/.distfiles
index 5826e7574..f03668b3a 100644
--- a/Test/.distfiles
+++ b/Test/.distfiles
@@ -1,52 +1,2 @@
DISTFILES_SRC='
-.cvsignore
-.distfiles
-A01grammar.ztst
-A02alias.ztst
-A03quoting.ztst
-A04redirect.ztst
-A05execution.ztst
-A06assign.ztst
-A07control.ztst
-B01cd.ztst
-B02typeset.ztst
-B03print.ztst
-B04read.ztst
-B05eval.ztst
-B06fc.ztst
-B07emulate.ztst
-B08shift.ztst
-C01arith.ztst
-C02cond.ztst
-C03traps.ztst
-C04funcdef.ztst
-C05debug.ztst
-D01prompt.ztst
-D02glob.ztst
-D03procsubst.ztst
-D04parameter.ztst
-D05array.ztst
-D06subscript.ztst
-D07multibyte.ztst
-D08cmdsubst.ztst
-D09brace.ztst
-E01options.ztst
-E02xtrace.ztst
-Makefile.in
-README
-V01zmodload.ztst
-V02zregexparse.ztst
-V03mathfunc.ztst
-V04features.ztst
-V05styles.ztst
-V06parameter.ztst
-V07pcre.ztst
-V08zpty.ztst
-X02zlevi.ztst
-Y01completion.ztst
-Y02compmatch.ztst
-Y03arguments.ztst
-comptest
-runtests.zsh
-ztst.zsh
'
diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
index 6abfd8b1f..9615f091b 100644
--- a/Test/A05execution.ztst
+++ b/Test/A05execution.ztst
@@ -209,7 +209,7 @@ F:This similar test was triggering a reproducible failure with pipestatus.
{ printf "%d\n" {1..20000} } | ( read -E )
hang(){ printf "%d\n" {2..20000} | cat }; hang | ( read -E )
print -p done
- read -Ep
+ read -Et 6 -p
0:Bug regression: piping a shell construct to an external process may hang
>1
>2
diff --git a/Util/.distfiles b/Util/.distfiles
index 162ace386..411938591 100644
--- a/Util/.distfiles
+++ b/Util/.distfiles
@@ -1,10 +1,4 @@
DISTFILES_SRC='
- .distfiles
- check_exports
- helpfiles
- mkdisttree.sh
- preconfig
- reporter
'
DISTFILES_NOT='
difflog.pl
diff --git a/Util/mkdisttree.sh b/Util/mkdisttree.sh
index 17b936ed7..2d55b06f8 100755
--- a/Util/mkdisttree.sh
+++ b/Util/mkdisttree.sh
@@ -51,9 +51,15 @@ trap 'rm -f $filelist; rm -rf $disttree; exit 1' 1 2 15
( while read dfn; do
subdir=`echo $dfn | sed 's,/\.distfiles$,,'`
echo >&2 "Processing directory $subdir..."
- eval "DISTFILES_$type="
+ eval "DISTFILES_$type= DISTFILES_NOT="
. $sdir_top/$dfn
eval "distfiles=\$DISTFILES_$type"
+ if [ $type = SRC ]; then
+ # All files in git appear in the source bundle, unless
+ # explicitly excluded with DISTFILES_NOT.
+ distfiles="$distfiles
+ `cd $sdir_top/$subdir; git ls-files | grep -v /`"
+ fi
if test -n "$distfiles"; then
cmds=`echo "$distfiles" | sed -e "$sed_separate"`
eval "$cmds"
@@ -62,6 +68,11 @@ trap 'rm -f $filelist; rm -rf $disttree; exit 1' 1 2 15
fi
$sdir_top/mkinstalldirs $disttree/$subdir || exit 1
for f in $deplist `test -z "$globlist" || ( cd $dir_top/$subdir && eval "echo $globlist")`; do
+ for fnot in $DISTFILES_NOT; do
+ if [ $fnot = $f ]; then
+ continue 2
+ fi
+ done
if test -f $dir_top/$subdir/$f; then
# ln $dir_top/$subdir/$f $disttree/$subdir/$f || \
cp -p $dir_top/$subdir/$f $disttree/$subdir/$f || exit 1