diff options
-rw-r--r-- | ChangeLog | 57 | ||||
-rw-r--r-- | Completion/BSD/Command/_cksum | 67 | ||||
-rw-r--r-- | Completion/Linux/Command/_ethtool | 25 | ||||
-rw-r--r-- | Completion/Linux/Command/_htop | 11 | ||||
-rw-r--r-- | Completion/Linux/Command/_pidof | 3 | ||||
-rw-r--r-- | Completion/Linux/Command/_ss | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_chown | 4 | ||||
-rw-r--r-- | Completion/Unix/Command/_diffstat | 20 | ||||
-rw-r--r-- | Completion/Unix/Command/_git | 59 | ||||
-rw-r--r-- | Completion/Unix/Command/_pgrep | 8 | ||||
-rw-r--r-- | Completion/Unix/Command/_sed | 1 | ||||
-rw-r--r-- | Completion/Unix/Command/_sqlite | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_ssh | 3 | ||||
-rw-r--r-- | Config/version.mk | 4 | ||||
-rw-r--r-- | Etc/FAQ.yo | 2 | ||||
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | README | 5 | ||||
-rw-r--r-- | Src/exec.c | 14 | ||||
-rw-r--r-- | Src/utils.c | 19 | ||||
-rw-r--r-- | Test/C04funcdef.ztst | 10 | ||||
-rw-r--r-- | configure.ac | 17 |
21 files changed, 272 insertions, 67 deletions
@@ -1,3 +1,58 @@ +2018-04-16 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * unposted: NEWS, README, Config/version.mk, Etc/FAQ.yo: update + to release 5.5.1. + +2018-04-16 Oliver Kiddle <okiddle@yahoo.co.uk> + + * 42659: Completion/Unix/Command/_git, Completion/Unix/Command/_sed, + Completion/Linux/Command/_ethtool, Completion/Linux/Command/_htop, + Completion/Linux/Command/_pidof, Completion/Unix/Command/_sqlite, + Completion/Unix/Command/_ssh: various completion option updates + + * 42658: Completion/Unix/Command/_diffstat: allow compact form of + option arguments to diffstat + + * Matthew Martin: 42643, 42644: Completion/BSD/Command/_cksum: + new cksum completion + + * Matthew Martin: 42642 (tweaked for Solaris): + Completion/Unix/Command/_chown: + OpenBSD chown does not support -f and dragonfly has -x + +2018-04-15 Barton E. Schaefer <schaefer@zsh.org> + + * 42650: Src/utils.c: fix 42156 for zero-sized terminals + + * 42636: Src/utils.c: fix GLOB_DOTS for !(RM_STAR_SILENT) + +2018-04-13 Daniel Hahler <zsh@thequod.de> + + * 42631: Completion/Unix/Command/_pgrep: _pgrep: pkill: fix completion + of signals. + +2018-04-12 Oliver Kiddle <okiddle@yahoo.co.uk> + + * 42624 (plus test): Src/exec.c, Test/C04funcdef.ztst: avoid + freeing memory that's still needed in multiple function + definition that has a duplicated function name + +2018-04-11 Peter Stephenson <p.stephenson@samsung.com> + + * 42623: configure.ac: some extra quotes needed (and some + cosmetic) for 42618. + +2018-04-10 Peter Stephenson <p.stephenson@samsung.com> + + * Benedikt Morbach: 42618: configure.ac: support signal names + from multiple include files as needed for glibc 2.25. + + * unposted: Config/version.mk: update dev version to 5.5-dev-0. + +2018-04-09 Eric Cook <llua@gmx.com> + * 42613: pda: Completion/Linux/Command/_ss + fix quoting typo + 2018-04-08 Peter Stephenson <p.w.stephenson@ntlworld.com> * unposted: release zsh-5.5. @@ -179,7 +234,7 @@ * 42487: Src/Zle/compctl.c: remove gcc 7.3.0 warnings and potentially incorrect pointer usage. -2018-03-18 Barton E. Schaefer <schaefer@brasslantern.com> +2018-03-18 Barton E. Schaefer <schaefer@zsh.org> * Stephane: 42469: Src/exec.c, Src/Modules/mapfile.c: fix 42465 diff --git a/Completion/BSD/Command/_cksum b/Completion/BSD/Command/_cksum new file mode 100644 index 000000000..4f5b68d8a --- /dev/null +++ b/Completion/BSD/Command/_cksum @@ -0,0 +1,67 @@ +#compdef cksum sum=cksum md2 md4 md5 rmd160 sha1 sha256 sha384 sha512 sha512t256 + +if [[ $OSTYPE == (dragonfly|freebsd)* && service == cksum ]]; then + _arguments -s -S -A '-*' \ + '-o[use specified historic algorithm]:historic algorithm:(1 2 3)' \ + '*:_files' + +else + local -a args + + case $OSTYPE in + dragonfly*|freebsd*|netbsd*) + args+=( + '-t[run built-in time trial]' + ) + ;| + dragonfly*|freebsd*|openbsd*) + args+=( + '-r[reverse the output format]' + ) + ;| + dragonfly*) + args+=( + '-b+[begin at specified offset]:begin offset: ' + '-e+[end at specified offset]:end offset: ' + ) + ;; + freebsd*) + args+=( + '-c+[compare digest against specified string]:digest string: ' + ) + ;; + netbsd*) + args+=( + '(*)-c+[compare checksums against specifed sumfile]:sumfile:_files' + '-n[reverse the output format]' + '-w[warn on malformed checksum files]' + ) + if [[ $service == cksum ]]; then + args=( + '(-o)-a+[use the specfied algorithm(s)]:algorithm:(crc md2 md4 md5 old1 old2 rmd160 sha1 sha256 sha384 sha512)' + '(-a)-o+[use the specfied historic algorithm]:historic algorithm:(1 2)' + ) + fi + ;; + openbsd*) + args+=( + '-b[output in base 64]' + '-C+[compare checksums against specifed checklist]:checklist:_files' + '-c[file arguments are checklists]' + '-h+[output to specified hashfile]:hashfile:_files' + '*-t[run built-in time trial]' + ) + if [[ $service == cksum ]]; then + args+=('*-a+[use the specfied algorithm(s)]:algorithm:_values -s , algotithm cksum md5 rmd160 sha1 sha224 sha256 sha384 sha512/256 sha512') + fi + ;; + esac + + _arguments -s -S -A '-*' \ + $args \ + '-p[echo stdin to stdout]' \ + '-q[quiet mode]' \ + '-s+[checksum specified string]:string: ' \ + '-x[run built-in test]' \ + '*:_files' +fi diff --git a/Completion/Linux/Command/_ethtool b/Completion/Linux/Command/_ethtool index 52b8f0451..84f2837a8 100644 --- a/Completion/Linux/Command/_ethtool +++ b/Completion/Linux/Command/_ethtool @@ -69,7 +69,7 @@ if [[ -n $state ]]; then rx-frames-low|tx-usecs-low|tx-frames-low|pkt-rate-high|rx-usecs-high) ;& rx-frames-high|tx-usecs-high|tx-frames-high|sample-interval|dmac|rx-mini) ;& rx-jumbo|offset|length|magic|value|phyad|proto|tos|tclass|l4proto|src-port) ;& - dst-port|spi|l4data|vlan-etype|vlan|user-def|action|vf|queue|loc|delete) ;& + dst-port|spi|l4data|vlan-etype|vlan|user-def|action|vf|queue|loc) ;& other|combined|tx-timer|count) _message -e numbers 'number' ;; @@ -130,17 +130,20 @@ if [[ -n $state ]]; then _message -e masks mask ;; hkey) - _message -e keys expl 'hash key' + _message -e keys 'hash key' ;; hfunc) - _message -e functions expl 'hash function' + _message -e functions 'hash function' ;; flags) - _message -e masks expl mask + _message -e masks mask ;; encoding) _wanted encodings expl encoding compadd auto off rs baser ;; + context) + _message -e contexts 'RSS context' + ;; *) case $words[2] in -A|--pause) @@ -218,7 +221,7 @@ if [[ -n $state ]]; then fi ;; -n|-u|--show-nfc|--show-ntuple) - _wanted options expl option compadd -F line - rx-flow-hash rule + _wanted options expl option compadd -F line - rx-flow-hash context rule ;; -N|-U|--config-nfc|--config-ntuple) if [[ $words[CURRENT-2] = rx-flow-hash ]]; then @@ -231,19 +234,25 @@ if [[ -n $state ]]; then 'f[bytes 0 and 1 of the Layer 4 header]' \ 'n[bytes 2 and 3 of the Layer 4 header]' \ 'r[discard all packets of this flow type]' + elif [[ $words[CURRENT-1] = delete ]]; then + _message -e numbers 'number' else - _wanted options expl option compadd -F line - rx-flow-hash flow-type \ + _wanted options expl option compadd -F line - rx-flow-hash context flow-type \ delete src dst proto src-ip dst-ip tos m tclass l4proto src-port \ dst-port spi l4data vlan-etype vlan user-def dst-mac action vf \ - queue loc + queue context loc fi ;; + -x|--show-rxfh-indir|--show-rxfh) + _wanted options expl option compadd -F line - context + ;; -X|--set-rxfh-indir|--rxfh) _values -S ' ' -w 'option' \ + context \ '(weight default)equal' \ '(equal default)weight' \ '(equal weight)default' \ - hkey hfunc + hkey hfunc delete ;; -f|--flash) if (( CURRENT = 4 )); then diff --git a/Completion/Linux/Command/_htop b/Completion/Linux/Command/_htop index 9a6133a86..28c7512bf 100644 --- a/Completion/Linux/Command/_htop +++ b/Completion/Linux/Command/_htop @@ -1,10 +1,11 @@ #compdef htop _arguments -S : \ - '(-d --delay)'{-d+,--delay=}'[update frequency]:duration' \ + '(-d --delay)'{-d+,--delay=}'[update frequency]:duration (tenths of seconds)' \ '(-C --no-color --no-colour)'{-C,--no-colo{,u}r}'[monochrome mode]' \ - '(-h --help)'{-h,--help}'[display help]' \ - '(-p --pid)'{-p+,--pid=}'[show given pids]: : _sequence -n ${$(</proc/sys/kernel/pid_max)\:-32768} _pids' \ - '(-s --sort-key)'{-s+,--sort-key=}'[sort by key]:key:( ${(f)"$($service --sort-key help)"} )' \ + '(-)'{-h,--help}'[display usage information]' \ + \*{-p+,--pid=}'[show given pids]: : _sequence -n ${$(</proc/sys/kernel/pid_max)\:-32768} _pids' \ + '(-s --sort-key)'{-s+,--sort-key=}'[sort by key]:key:( ${(f)"$(_call_program sort-keys $words[1] --sort-key help)"} )' \ + '(-t --tree)'{-t,--tree}'[show tree view of processes]' \ '(-u --user)'{-u+,--user=}'[show processes of user]: : _users' \ - '(-v --version)'{-v,--version}'[print version information]' + '(-)'{-v,--version}'[display version information]' diff --git a/Completion/Linux/Command/_pidof b/Completion/Linux/Command/_pidof index 6605e7e67..05fb23d45 100644 --- a/Completion/Linux/Command/_pidof +++ b/Completion/Linux/Command/_pidof @@ -10,7 +10,8 @@ _arguments -C -s -w \ "(-s --single-shot $exargs)"{-s,--single-shot}'[return one PID only]' \ "(-c --check-root $exargs)"{-c,--check-root}'[omit processes with different root]' \ "(-x $exargs)"-x'[include shells running named scripts]' \ - "($exargs)"\*{-o+,--omit-pid}'[omit processes with PIDs]:pids:_sequence -s , _pids' \ + "($exargs)"\*{-o+,--omit-pid=}'[omit processes with PIDs]:pids:_sequence -s , _pids' \ + '(-S --separator)'{-S+,--separator=}'[specify separator put between PIDs]:separator' \ '*:process:->procnames' \ && return 0 diff --git a/Completion/Linux/Command/_ss b/Completion/Linux/Command/_ss index afe00b6a3..dff289947 100644 --- a/Completion/Linux/Command/_ss +++ b/Completion/Linux/Command/_ss @@ -33,7 +33,7 @@ _arguments -C -s \ "($info -d --dccp)"{-d,--dccp}'[display DCCP sockets]' \ "($info -w --raw)"{-w,--raw}'[display RAW sockets]' \ "($info -x --unix)"{-x,--unix}'[display Unix domain sockets]' \ - "($info)--vsock[display only vsock sockets]' \ + "($info)--vsock[display only vsock sockets]" \ "($info -f --family)"{-f,--family}'[display sockets of specified type]:family:(unix inet inet6 link netlink unix vsock)' \ "($info -K --kill)"{-K,--kill}'[forcibly close sockets, display what was closed]' \ "($info -H --no-header)"{-H,--no-header}'[suppress header line]' \ diff --git a/Completion/Unix/Command/_chown b/Completion/Unix/Command/_chown index c3abb5858..2c63a399a 100644 --- a/Completion/Unix/Command/_chown +++ b/Completion/Unix/Command/_chown @@ -23,7 +23,6 @@ if _pick_variant gnu=Free\ Soft unix --version; then args+=( '--from=[restrict changes to files by current ownership]: :->owner' ) else args=( - "-f[don't report errors]" "-h[operate on symlinks them self]" '-R[change files and directories recursively]' '(-H -L -P)-L[follow all symlinks]' @@ -31,7 +30,8 @@ else '(-H -L -P)-P[do not follow symlinks (default)]' ) for pattern arg in \ - 'freebsd*' "-x[don't traverse file systems]" \ + '(dragonfly|freebsd)*' "-x[don't traverse file systems]" \ + '(darwin|dragonfly|(free|net)bsd|solaris)*' "-f[don't report errors]" \ '(darwin|dragonfly|(free|net)bsd)*' '-v[output info for every file processed]' \ 'solaris2.<11->' '-s[owner and/or group are Windows SID strings]' do diff --git a/Completion/Unix/Command/_diffstat b/Completion/Unix/Command/_diffstat index c9f8e3049..9e7bf779b 100644 --- a/Completion/Unix/Command/_diffstat +++ b/Completion/Unix/Command/_diffstat @@ -5,28 +5,28 @@ _arguments -s -S \ '-c[prefix each line with hash mark]' \ '-C[use color highlighting of histogram]' \ '-d[print debug information]' \ - '-D[specify location of patched files for unchanged count]:location:_directories' \ - '-e[redirect standard error to specified file]:error file:_files' \ + '-D+[specify location of patched files for unchanged count]:location:_directories' \ + '-e+[redirect standard error to specified file]:error file:_files' \ '-E[trim escape sequences, e.g. from colordiff]' \ - '-f[specify histogram format]:format:((0\:concise 1\:normal 2\:dots 3\:dots+normal 4\:value 5\:value+normal 6\:value+dots 7\:value+dots+normal))' \ + '-f+[specify histogram format]:format:((0\:concise 1\:normal 2\:dots 3\:dots+normal 4\:value 5\:value+normal 6\:value+dots 7\:value+dots+normal))' \ '(- *)-h[display help information]' \ '-k[suppress merging of filenames in report]' \ '-K[resolve ambiguity of "only" filenames]' \ '-l[list only the filenames]' \ '-m[merge insert/delete data in chunks as modified-lines]' \ - '-n[specify minimum width for filenames]:width [auto]' \ - '-N[specify maximum width for filenames]:width [auto]' \ - '-o[redirect standard output to specified file]:output file:_files' \ - '-p[specify number of path separators to strip]:path components [common]' \ + '-n+[specify minimum width for filenames]:width [auto]' \ + '-N+[specify maximum width for filenames]:width [auto]' \ + '-o+[redirect standard output to specified file]:output file:_files' \ + '-p+[specify number of path separators to strip]:path components [common]' \ '-q[suppress "0 files changed" message for empty diffs]' \ - '-r[specify rounding for histogram]:rounding:((0\:none 1\:simple 2\:simple+adjustment))' \ + '-r+[specify rounding for histogram]:rounding:((0\:none 1\:simple 2\:simple+adjustment))' \ '(-t)-s[show only the summary line]' \ - '-S[specify location of original files for unchanged count]:location:_directories' \ + '-S+[specify location of original files for unchanged count]:location:_directories' \ '-R[assume patch was created with old and new files swapped]' \ '(-T -s)-t[overrides histogram, generates csv output]' \ '(-t)-T[print amounts (like -t) in addition to histogram]' \ '-u[suppress sorting of filenames in report]' \ '-v[show progress]' \ '(- *)-V[print version number]' \ - '-w[specify maximumn width of output]:maximum width [80]' \ + '-w+[specify maximumn width of output]:maximum width [80]' \ '*:patch file:_files' diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 0eb16987d..f6cec8b60 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -116,6 +116,8 @@ _git-am () { '(-u --utf8 --no-utf8)--no-utf8[pass -n to git mailinfo]' \ '(-3 --3way)'{-3,--3way}'[use 3-way merge if patch does not apply cleanly]' \ $apply_options \ + '--quit[abort the patching operation but keep HEAD where it is]' \ + '--show-current-patch[show the patch being applied]' \ '(-i --interactive)'{-i,--interactive}'[apply patches interactively]' \ '--committer-date-is-author-date[use author date as committer date]' \ '--ignore-date[use committer date as author date]' \ @@ -637,6 +639,7 @@ _git-clone () { '--separate-git-dir[place .git dir outside worktree]:path to .git dir:_path_files -/' \ '(-4 --ipv4 -6 --ipv6)'{-4,--ipv4}'[use IPv4 addresses only]' \ '(-4 --ipv4 -6 --ipv6)'{-6,--ipv6}'[use IPv6 addresses only]' \ + '--filter=[object filtering]:filter:_git_rev-list_filters' \ ': :->repository' \ ': :_directories' && ret=0 @@ -685,6 +688,8 @@ _git-commit () { $reset_author_opt \ '( --porcelain --dry-run)--short[dry run with short output format]' \ '--branch[show branch information]' \ + '!(--no-ahead-behind)--ahead-behind' \ + "--no-ahead-behind[don't display detailed ahead/behind counts relative to upstream branch]" \ '(--short --dry-run)--porcelain[dry run with machine-readable output format]' \ '(--short --porcelain --dry-run -z --null)'{-z,--null}'[dry run with NULL-separated output format]' \ {-p,--patch}'[use the interactive patch selection interface to chose which changes to commit]' \ @@ -865,6 +870,8 @@ _git-fetch () { '--deepen[deepen history of shallow clone]:number of commits' \ '(-n --no-tags -t --tags)'{-n,--no-tags}'[disable automatic tag following]' \ '(--all -m --multiple)'{-m,--multiple}'[fetch from multiple remotes]' \ + '(-P --prune-tags)'{-P,--prune-tags}'[prune local tags no longer on remote and clobber changed tags]' \ + '--filter=[object filtering]:filter:_git_rev-list_filters' \ '*:: :->repository-or-group-or-refspec' && ret=0 case $state in @@ -1431,6 +1438,7 @@ _git-rebase () { '(-)--edit-todo[edit interactive instruction sheet in an editor]' \ '(-)--skip[skip the current patch]' \ '(-)--quit[abort but keep HEAD where it is]' \ + '(-)--show-current-patch[show the patch file being applied or merged]' \ - options \ '(-m --merge)'{-m,--merge}'[use merging strategies to rebase]' \ '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=-}'[GPG-sign the commit]::key id' \ @@ -1450,6 +1458,7 @@ _git-rebase () { '(-p --preserve-merges --interactive)'{-p,--preserve-merges}'[try to recreate merges instead of ignoring them]' \ {-x+,--exec=}'[with -i\: append "exec <cmd>" after each line]:command:_command_names -e' \ '(-k --keep-empty)'{-k,--keep-empty}'[keep empty commits in the result]' \ + '--allow-empty-message[allow rebasing commits with empty messages]' \ '(1)--root[rebase all reachable commits]' \ $autosquash_opts \ '(--autostash --no-autostash)--autostash[stash uncommitted changes before rebasing and apply them afterwards]' \ @@ -1747,6 +1756,8 @@ _git-status () { $branch_opts \ '(-s --short)--porcelain=-[produce machine-readable output]:version:(v1)' \ '(-s --short)--show-stash[show stash information]' \ + '!(--no-ahead-behind)--ahead-behind' \ + "--no-ahead-behind[don't display detailed ahead/behind counts relative to upstream branch]" \ '(-u --untracked-files)'{-u-,--untracked-files=-}'[show untracked files]::mode:((no\:"show no untracked files" \ normal\:"show untracked files and directories" \ all\:"also show untracked files in untracked directories (default)"))' \ @@ -1988,6 +1999,7 @@ _git-tag () { _arguments \ - creation \ '(-a --annotate -s --sign -u --local-user)'{-a,--annotate}'[create an unsigned, annotated tag]' \ + '(-e --edit)'{-e,--edit}'[force edit of tag message]' \ '(-a --annotate -s --sign -u --local-user)'{-s,--sign}'[create a signed and annotated tag]' \ '(-a --annotate -s --sign)'{-u+,--local-user=}'[create a tag, annotated and signed with the given key]: :__git_gpg_secret_keys' \ '(-f --force)'{-f,--force}'[replace existing tag]' \ @@ -2037,6 +2049,8 @@ _git-worktree() { prune:'prune working tree information' list:'list details of each worktree' lock:'prevent a working tree from being pruned' + move:'move a working tree to a new location' + remove:'remove a working tree' unlock:'allow working tree to be pruned, moved or deleted' ) @@ -2051,32 +2065,44 @@ _git-worktree() { else args=( ':commit:__git_commits' ) fi - _arguments \ + _arguments -S \ '(-f --force)'{-f,--force}'[checkout branch even if already checked out in another worktree]' \ '(-B --detach)-b+[create a new branch]: :__git_branch_names' \ '(-b --detach)-B+[create or reset a branch]: :__git_branch_names' \ '(-b -B)--detach[detach HEAD at named commit]' \ '--no-checkout[suppress file checkout in new worktree]' \ - ':path:_files' $args && ret=0 + '--lock[keep working tree locked after creation]' \ + ':path:_directories' $args && ret=0 ;; (prune) - _arguments \ + _arguments -S \ '(-n --dry-run)'{-n,--dry-run}"[don't remove, show only]" \ '(-v --verbose)'{-v,--verbose}'[report pruned objects]' \ '--expire[expire objects older than specified time]:time' && ret=0 ;; (list) - _arguments '--porcelain[machine-readable output]' && ret=0 + _arguments -S '--porcelain[machine-readable output]' && ret=0 ;; (lock) - _arguments -C '--reason=[specify reason for locking]:reason' ': :->worktrees' && ret=0 - [[ -z $state ]] && return ret - ;& + _arguments -C -S '--reason=[specify reason for locking]:reason' ': :->worktrees' && ret=0 + ;; + (move) + _arguments -C \ + ': :->worktrees' \ + ':location:_directories' && ret=0 + ;; + (remove) + _arguments -C -S '--force[remove working trees that are not clean or that have submodules]' \ + ': :->worktrees' && ret=0 + ;; (unlock) - _wanted directories expl 'working tree' compadd -S ' ' -f -M 'r:|/=* r:|=*' \ - ${${(M)${(f)"$(_call_program directories git worktree list --porcelain)"}:#worktree*}#* } + state=worktrees ;; esac + if [[ $state = worktrees ]]; then + _wanted directories expl 'working tree' compadd -S ' ' -f -M 'r:|/=* r:|=*' \ + ${${(M)${(f)"$(_call_program directories git worktree list --porcelain)"}:#worktree*}#* } && ret=0 + fi ;; esac return ret @@ -3442,6 +3468,7 @@ _git-prune () { '(-v --verbose)'{-v,--verbose}'[report all removed objects]' \ '--progress[show progress]' \ '--expire=[only expire loose objects older than specified date]: :__git_datetimes' \ + '--exclude-promisor-objects[limit traversal to objects outside promisor packfiles]' \ '*:: :__git_heads' } @@ -4133,11 +4160,14 @@ _git-send-email () { '--cc-cover[copy the Cc: list from the first file to the rest]' \ '--compose[edit introductory message for patch series]' \ '--from=[specify sender]:email address:_email_addresses' \ + '--reply-to=[specify Reply-To address]:email address:_email_addresses' \ '--in-reply-to=[specify contents of first In-Reply-To header]:message-id' \ '--subject=[specify the initial subject of the email thread]:subject' \ '--to=[specify the primary recipient of the emails]: :_email_addresses' \ + "--no-xmailer[don't add X-Mailer header]" \ '--8bit-encoding=[encoding to use for non-ASCII messages]: :__git_encodings' \ '--compose-encoding=[encoding to use for compose messages]: :__git_encodings' \ + '--transfer-encoding=[specify transfer encoding to use]:transfer encoding:(quoted-printable 8bit base64)' \ '--envelope-sender[specify the envelope sender used to send the emails]: :_email_addresses' \ '--smtp-encryption=[specify encryption method to use]: :__git_sendemail_smtpencryption_values' \ '--smtp-domain=[specify FQDN used in HELO/EHLO]: :_domains' \ @@ -4147,7 +4177,10 @@ _git-send-email () { '--smtp-server-option=[specify the outgoing SMTP server option to use]:SMPT server option' \ '--smtp-ssl-cert-path=[path to ca-certificates (directory or file)]:ca certificates path:_files' \ '--smtp-user=[specify user to use for SMTP-AUTH]:smtp user:_users' \ + '--smtp-auth=[specify allowed AUTH mechanisms]:space-separated list of mechanisms' \ '--smtp-debug=[enable or disable debug output]:smtp debug:((0\:"disable" 1\:"enable"))' \ + '--batch-size=[specify maximum number of messages per connection]:number' \ + '--relogin-delay=[specify delay between successive logins]:delay (seconds)' \ '--cc-cmd=[specify command to generate Cc\: header with]:Cc\: command:_cmdstring' \ '--to-cmd=[specify command to generate To\: header with]:To\: command:_cmdstring' \ '( --no-chain-reply-to)--chain-reply-to[send each email as a reply to previous one]' \ @@ -4168,6 +4201,7 @@ _git-send-email () { '( --no-validate)--validate[perform sanity checks on patches]' \ '(--validate )--no-validate[do not perform sanity checks on patches]' \ '--force[send emails even if safety checks would prevent it]' \ + '(- *)--dump-aliases[dump configured aliases and exit]' \ '*: : _alternative -O expl "files:file:_files" "commits:recent commit object name:__git_commit_objects_prefer_recent"' @@ -4671,7 +4705,8 @@ _git-pack-objects () { '--use-bitmap-index[use a bitmap index if available to speed up counting objects]' \ '--write-bitmap-index[write a bitmap index together with the pack index]' \ '--filter=[omit certain objects from pack file]:filter:_git_rev-list_filters' \ - '--missing=[specify how missing objects are handled]:action:(error allow-any print)' \ + '--missing=[specify how missing objects are handled]:action:(error allow-any allow-promisor print)' \ + "--exclude-promisor-objects[don't pack objects in promisor packfiles]" \ ':base-name:_files' } @@ -5080,7 +5115,7 @@ _git-rev-list () { '--no-filter[turn off any previous --filter argument]' \ '--filter-print-omitted[print a list of objects omitted by --filter]' \ '--filter=[omit certain objects from pack file]:filter:_git_rev-list_filters' \ - '--missing=[specify how missing objects are handled]:action:(error allow-any print)' \ + '--missing=[specify how missing objects are handled]:action:(error allow-any allow-promisor print)' \ '(--count --pretty --header --left-right --abbrev-commit --abbrev --parent --children)--quiet[print nothing; exit status indicates if objects are fully connected]' \ '--use-bitmap-index[try to speed traversal using pack bitmap index if available]' \ '--progress=-[show progress reports as objects are considered]:header' \ @@ -5197,6 +5232,7 @@ _git-daemon () { '--forbid-override[forbid overriding site-wide service]: :__git_daemon_service' \ '(--no-informative-errors)--informative-errors[report more verbose errors to the client]' \ '(--informative-errors)--no-informative-errors[report all errors as "access denied" to the client]' \ + '--log-destination=[send log messages to the specified destination]:destination:(stderr syslog none)' \ '*:repository:_directories' } @@ -7071,6 +7107,7 @@ __git_setup_diff_options () { '--diff-filter=-[select certain kinds of files for diff]: :_guard "[AaCcDdMmRrTtUuXxBb*]#" kinds' '-S-[look for differences that add or remove the given string]:string' '-G-[look for differences whose added or removed line matches the given regex]:pattern' + '--find-object=[look for differences that change the number of occurrences of the specified object]:object:__git_blobs' '--pickaxe-all[when -S finds a change, show all changes in that changeset]' '--pickaxe-regex[treat argument of -S as regular expression]' '-O-[output patch in the order of glob-pattern lines in given file]: :_files' diff --git a/Completion/Unix/Command/_pgrep b/Completion/Unix/Command/_pgrep index 714bf095b..ec3f8bfd0 100644 --- a/Completion/Unix/Command/_pgrep +++ b/Completion/Unix/Command/_pgrep @@ -32,9 +32,7 @@ arguments=('-P[parent process id]:parent process id:->ppid' '-x[match exactly]' '-z[match only in zones]:zone:_zones') -if [[ $service == 'pkill' ]]; then - arguments+=('-'${^signals}'[signal]') -elif [[ $service == 'pgrep' ]]; then +if [[ $service == 'pgrep' ]]; then arguments+=('-d[output delimiter]:delimiter:compadd ${(s\:\:)IFS}' '-l[list name in addition to id]') fi @@ -64,8 +62,12 @@ case "$OSTYPE" in optchars="flvxdnoPgsuUGt" ;; esac +# Only keep relevant arguments according to $optchars. arguments=( ${(M)arguments:#(|\*)(|\(*\))-[$optchars]*} '*:process name:->pname') +if [[ $service == 'pkill' ]]; then + arguments+=('-'${^signals}'[signal]') +fi _arguments -C -s -w $arguments && ret=0 diff --git a/Completion/Unix/Command/_sed b/Completion/Unix/Command/_sed index 222798b8a..15b92a634 100644 --- a/Completion/Unix/Command/_sed +++ b/Completion/Unix/Command/_sed @@ -21,6 +21,7 @@ elif _pick_variant gnu=GNU unix --version; then args+=( '--follow-symlinks[follow symlinks when processing in place]' '(-i --in-place)'{-i-,--in-place=-}$inplace + '(-c --copy)'{-c,--copy}'[copy instead of rename when shuffling files in in-place mode]' '(-l --line-length)'{-l,--line-length=-}'[specify line-wrap length for the l command]' '(-r)--posix[disable GNU extensions]' '(-E -r --regexp-extended)'{-E,-r,--regexp-extended}$extended diff --git a/Completion/Unix/Command/_sqlite b/Completion/Unix/Command/_sqlite index f63f4c085..58f7a9116 100644 --- a/Completion/Unix/Command/_sqlite +++ b/Completion/Unix/Command/_sqlite @@ -41,6 +41,7 @@ options+=( ) (( $+sqlite3 )) && options+=( + $^dashes'-append[append the database to the end of the file]' $^dashes'-bail[stop after hitting an error]' $^dashes'-cmd[run specified command before reading stdin]:sqlite meta-command' '(-*batch -*interactive)'$^dashes'-batch[force batch I/O]' @@ -49,6 +50,7 @@ options+=( $^dashes'-mmap[set default mmap size]:size' $^dashes'-newline[set output row separator]:separator [\n]' $^dashes'-pagecache[specify size and number of slots for page cache memory]:size (bytes): :slots' + $^dashes'-readonly[open the database read-only]' $^dashes'-stats[print memory stats before each finalize]' $^dashes'-vfs[use specified default VFS]:vfs:(unix-dotfile unix-excl unix-none unix-namedsem)' ) diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index 2aae7027e..9c827d655 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -32,6 +32,7 @@ _ssh () { _arguments -C -s \ '(-a)-A[enable forwarding of the authentication agent connection]' \ '(-A)-a[disable forwarding of authentication agent connection]' \ + '-B+[bind to specified interface before attempting to connect]:interface:_net_interfaces' \ '(-P)-b+[specify interface to transmit on]:bind address:_bind_addresses' \ '-D+[specify a dynamic port forwarding]:dynamic port forwarding:->dynforward' \ '-e+[set escape character]:escape character (or `none'\''):' \ @@ -90,6 +91,8 @@ _ssh () { '-k[load plain private keys only and skip certificates]' \ '-L[list public key parameters of all identities in the agent]'\ '-l[list all identities]' \ + '-m+[specify minimum remaining signatures before maximum is changed]:number' \ + '-M+[specify maximum number of signatures]:number' \ '-s+[add keys provided by the PKCS#11 shared library]:library:_files -g "*.(so|dylib)(|.<->)(-.)"' \ '-t+[set maximum lifetime for identity]:maximum lifetime (in seconds or time format):' \ '-q[be quiet after a successful operation]' \ diff --git a/Config/version.mk b/Config/version.mk index 73aababd5..b703c2563 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.5 -VERSION_DATE='April 8, 2018' +VERSION=5.5.1 +VERSION_DATE='April 16, 2018' diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo index c1b2f52ff..72ff7fa3d 100644 --- a/Etc/FAQ.yo +++ b/Etc/FAQ.yo @@ -306,7 +306,7 @@ sect(On what machines will it run?) sect(What's the latest version?) - Zsh 5.5 is the latest production version. For details of all the + Zsh 5.5.1 is the latest production version. For details of all the changes, see the NEWS file in the source distribution. A beta of the next version is sometimes available. Development of zsh is @@ -4,6 +4,12 @@ CHANGES FROM PREVIOUS VERSIONS OF ZSH Note also the list of incompatibilities in the README file. +Changes from %.5 to 5.5.1 +------------------------- + +Apart from a fix for a configuration problem finding singal names from +(some) recent versions of glibc, there are only minor changes. + Changes from 5.4.2 to 5.5 ------------------------- @@ -5,9 +5,10 @@ THE Z SHELL (ZSH) Version ------- -This is version 5.5 of the shell. This is a stable release. There +This is version 5.5.1 of the shell. This is a stable release. There are some significant bug fixes and a few user visible additions since -5.4.2. All zsh installations are encouraged to upgrade. +5.4.2 and minor fixes since 5.5. All zsh installations are encouraged +to upgrade. Note in particular the changes highlighted under "Incompatibilities since 5.4.2" below. See NEWS for more information. diff --git a/Src/exec.c b/Src/exec.c index e154d1249..216057aa7 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -5042,7 +5042,7 @@ execfuncdef(Estate state, Eprog redir_prog) Shfunc shf; char *s = NULL; int signum, nprg, sbeg, nstrs, npats, len, plen, i, htok = 0, ret = 0; - int nfunc = 0, anon_func = 0; + int anon_func = 0; Wordcode beg = state->pc, end; Eprog prog; Patprog *pp; @@ -5118,12 +5118,16 @@ execfuncdef(Estate state, Eprog redir_prog) /* * redir_prog is permanently allocated --- but if * this function has multiple names we need an additional - * one. + * one. Original redir_prog used with the last name + * because earlier functions are freed in case of duplicate + * names. */ - if (nfunc++ && redir_prog) + if (names && nonempty(names) && redir_prog) shf->redir = dupeprog(redir_prog, 0); - else + else { shf->redir = redir_prog; + redir_prog = 0; + } shfunc_set_sticky(shf); if (!names) { @@ -5203,7 +5207,7 @@ execfuncdef(Estate state, Eprog redir_prog) } if (!anon_func) setunderscore(""); - if (!nfunc && redir_prog) { + if (redir_prog) { /* For completeness, shouldn't happen */ freeeprog(redir_prog); } diff --git a/Src/utils.c b/Src/utils.c index 180693d67..b41851700 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1834,8 +1834,9 @@ adjustlines(int signalled) else shttyinfo.winsize.ws_row = zterm_lines; #endif /* TIOCGWINSZ */ - if (zterm_lines < 0) { - DPUTS(signalled, "BUG: Impossible TIOCGWINSZ rows"); + if (zterm_lines <= 0) { + DPUTS(signalled && zterm_lines < 0, + "BUG: Impossible TIOCGWINSZ rows"); zterm_lines = tclines > 0 ? tclines : 24; } @@ -1858,8 +1859,9 @@ adjustcolumns(int signalled) else shttyinfo.winsize.ws_col = zterm_columns; #endif /* TIOCGWINSZ */ - if (zterm_columns < 0) { - DPUTS(signalled, "BUG: Impossible TIOCGWINSZ cols"); + if (zterm_columns <= 0) { + DPUTS(signalled && zterm_columns < 0, + "BUG: Impossible TIOCGWINSZ cols"); zterm_columns = tccolumns > 0 ? tccolumns : 80; } @@ -2775,10 +2777,11 @@ checkrmall(char *s) const int max_count = 100; if ((rmd = opendir(unmeta(s)))) { int ignoredots = !isset(GLOBDOTS); - /* ### TODO: Passing ignoredots here is wrong. See workers/41672 - aka <https://bugs.debian.org/875460>. - */ - while (zreaddir(rmd, ignoredots)) { + char *fname; + + while ((fname = zreaddir(rmd, 1))) { + if (ignoredots && *fname == '.') + continue; count++; if (count > max_count) break; diff --git a/Test/C04funcdef.ztst b/Test/C04funcdef.ztst index 5786018e0..3aaf7fb4a 100644 --- a/Test/C04funcdef.ztst +++ b/Test/C04funcdef.ztst @@ -43,6 +43,16 @@ 0:Function definition without braces >bar + a a b() { + read word + print $0: $word + } <<<redirection + b + a +0:Multiple function definition with duplicate name and redirection +>b: redirection +>a: redirection + functions -M m1 m1() { (( $# )) } print $(( m1() )) diff --git a/configure.ac b/configure.ac index 1a498f8b2..d15a6cda2 100644 --- a/configure.ac +++ b/configure.ac @@ -1540,22 +1540,25 @@ if test -z "$sigfile_list"; then /usr/include/bits/signum.h /dev/null" fi -for SIGNAL_H in $sigfile_list +for SIGNAL_TRY_H in $sigfile_list do dnl Try to make sure it doesn't get confused by files that don't dnl have real signal definitions in, but do #define SIG* by counting dnl the number of signals. Maybe we could even check for e.g. SIGHUP? - nsigs=`test -f $SIGNAL_H && \ - grep '#[ ]*define[ ][ ]*SIG[0-9A-Z]*[ ]*[0-9][0-9]*' $SIGNAL_H | \ + nsigs=`test -f $SIGNAL_TRY_H && \ + grep '#[ ]*define[ ][ ]*SIG[0-9A-Z]*[ ]*[0-9][0-9]*' $SIGNAL_TRY_H | \ wc -l | sed 's/[ ]//g'` - test "x$nsigs" != x && test "$nsigs" -ge 7 && break + if test "x$nsigs" != x && test "$nsigs" -ge 7 + then + SIGNAL_H="$SIGNAL_H $SIGNAL_TRY_H" + fi done -if test x$SIGNAL_H = x"/dev/null"; then +if test "x$SIGNAL_H" = x; then AC_MSG_ERROR(SIGNAL MACROS NOT FOUND: please report to developers) fi -zsh_cv_path_signal_h=$SIGNAL_H +zsh_cv_path_signal_h="$SIGNAL_H" ]) -SIGNAL_H=$zsh_cv_path_signal_h +SIGNAL_H="$zsh_cv_path_signal_h" AC_SUBST(SIGNAL_H)dnl dnl Where are error names located? Needed as input for errnames1.awk |