diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2015-06-02 00:41:20 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2015-06-02 00:41:20 +0200 |
commit | 752cbfd48ab774e3de0ecf49543fe748a03406df (patch) | |
tree | a78726bf01b008c9b60f84257210b45870da09dd | |
parent | 8b373331f539bedc68aa74b1fe0472151f1bea68 (diff) | |
parent | f0068edb4888a4d8fe94defa9c7affaa15e917c9 (diff) | |
download | zsh-752cbfd48ab774e3de0ecf49543fe748a03406df.tar.gz zsh-752cbfd48ab774e3de0ecf49543fe748a03406df.zip |
New upstream release: Merge tag 'zsh-5.0.8' / branch 'upstream' into 'debian'.
-rw-r--r-- | ChangeLog | 61 | ||||
-rw-r--r-- | Completion/Base/Utility/_store_cache | 11 | ||||
-rw-r--r-- | Completion/Unix/Command/_git | 91 | ||||
-rw-r--r-- | Completion/X/Command/_matlab | 12 | ||||
-rw-r--r-- | Config/version.mk | 4 | ||||
-rw-r--r-- | Doc/Zsh/builtins.yo | 19 | ||||
-rw-r--r-- | Doc/Zsh/expn.yo | 7 | ||||
-rw-r--r-- | Doc/Zsh/options.yo | 11 | ||||
-rw-r--r-- | Doc/Zsh/zftpsys.yo | 2 | ||||
-rw-r--r-- | Etc/FAQ.yo | 4 | ||||
-rw-r--r-- | Functions/Zftp/zfget_match | 24 | ||||
-rw-r--r-- | Src/Modules/parameter.c | 5 | ||||
-rw-r--r-- | Src/builtin.c | 27 | ||||
-rw-r--r-- | Src/exec.c | 12 | ||||
-rw-r--r-- | Src/parse.c | 25 | ||||
-rw-r--r-- | Src/subst.c | 1 | ||||
-rw-r--r-- | Test/C02cond.ztst | 14 | ||||
-rw-r--r-- | Test/D04parameter.ztst | 8 |
18 files changed, 238 insertions, 100 deletions
@@ -1,5 +1,59 @@ +2015-05-31 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * unposted: Config/version.mk: release 5.0.8, finally. + + * 35343: Doc/Zsh/expn.yo, Doc/Zsh/options.yo, Src/subst.c, + Test/D04parameter.ztst: $#foo for any valid identifier + is only the length of foo if POSIX_IDENTIFIERS is not set. + +2015-05-30 Barton E. Schaefer <schaefer@zsh.org> + + * users/20238: Doc/Zsh/builtins.yo, Src/builtin.c: add "fc -L" to + operate only on the local shell history when history sharing is + in effect. Also avoid invoking the editor on empty results. + +2015-05-30 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * Han Pingtian: 35324: Functions/Zftp/zfget_match: better zfget + completion with paths. + + * Han Pingtian: 35311: Doc/Zsh/zftpsys.yo: typo in zfuput + behaviour. + +2015-05-30 Barton E. Schaefer <schaefer@zsh.org> + + * Oliver Kiddle: 35310 (plus undo 35268 (git 899613f)): + Completion/Base/Utility/_store_cache: fix quoting of cached arrays + +2015-05-29 Peter Stephenson <p.stephenson@samsung.com> + + * 35326: Src/subst.c, Test/D04parameter.ztst: $#- was misparsed + as ${#-}. + + * users/20237: Src/Modules/parameter.c: $functions[foo] + shouldn't be unmetafied when passed as parameter body. + +2015-05-28 Daniel Hahler <zsh@thequod.de> + + * 35098: Completion/Unix/Command/_git: provide --amend also with + "message" group. + +2015-05-28 Oliver Kiddle <opk@zsh.org> + + * 35315: Completion/Unix/Command/_git, Completion/X/Command/_matlab; + replace inappropriate uses of _path_commands + +2015-05-28 Peter Stephenson <p.stephenson@samsung.com> + + * 35318: Doc/Zsh/builtins.yo, Doc/Zsh/options.yo, Src/builtin.c, + Src/exec.c: POSIX_BUILTINS compatibility for OPTIND processing + in getopts. + 2015-05-27 Peter Stephenson <p.w.stephenson@ntlworld.com> + * 35306: Src/parse.c, Test/C02cond.ztst: "test -z \(" + failed owing to overeager parsing. + * unposted: Config/version.mk: 5.0.7-dev-4. 2015-05-27 Daniel Hahler <zsh@thequod.de> @@ -25,9 +79,10 @@ 2015-05-26 Peter Stephenson <p.stephenson@samsung.com> - * see 35268: revert 34476 (ae7dcab) as it seems to be having - effects beyond the intended optimisation of completion caching. - To be investigated further after the release. + * see 35268: Completion/Base/Utility/_store_cache: revert 34476 + (ae7dcab) as it seems to be having effects beyond the intended + optimisation of completion caching. To be investigated further + after the release. * Han Pingtian: 35295: Functions/Zftp/zfcd_match: be more inventive zftp directory listing. diff --git a/Completion/Base/Utility/_store_cache b/Completion/Base/Utility/_store_cache index 86e72e9a9..fb2ab328a 100644 --- a/Completion/Base/Utility/_store_cache +++ b/Completion/Base/Utility/_store_cache @@ -46,8 +46,15 @@ if zstyle -t ":completion:${curcontext}:" use-cache; then for var; do case ${(Pt)var} in (*readonly*) ;; - (*(association|array)*) print -r "$var=( ${(kv@Pqq)^^var} )";; - (*) print -r "$var=${(Pqq)^^var}";; + (*(association|array)*) + # Dump the array as a here-document to reduce parsing overhead + # when reloading the cache with "source" from _retrieve_cache + print -r "$var=( "'${(Q)"${(z)$(<<\EO:'"$var" + print -r "${(kv@Pqq)^^var}" + print -r "EO:$var" + print -r ')}"} )' + ;; + (*) print -r "$var=${(Pqq)^^var}";; esac done >! "$_cache_dir/$_cache_ident" else diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 4403a48a8..b8edc109e 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -681,14 +681,14 @@ _git-commit () { '(-S --gpg-sign --no-gpg-sign)'{-S-,--gpg-sign=}'[GPG-sign the commit]::key id' \ '(-S --gpg-sign --no-gpg-sign)--no-gpg-sign[do not GPG-sign the commit]' \ '(-a --all --interactive -o --only -i --include *)--interactive[interactively update paths in the index file]' \ + $amend_opt \ '*: :__git_ignore_line_inside_arguments __git_changed_files' \ - '(message)' \ {-C,--reuse-message=}'[use existing commit object with same log message]: :__git_commits' \ {-c,--reedit-message=}'[use existing commit object and edit log message]: :__git_commits' \ {-F,--file=}'[read commit message from given file]: :_files' \ {-m,--message=}'[use the given message as the commit message]:message' \ - {-t,--template=}'[use file as a template commit message]:template:_files' \ - $amend_opt + {-t,--template=}'[use file as a template commit message]:template:_files' } (( $+functions[_git-describe] )) || @@ -946,7 +946,7 @@ _git-grep () { '(-n --line-number)'{-n,--line-number}'[prefix the line number to matching lines]' \ '(-l --files-with-matches -L --files-without-match --name-only)'{-l,--files-with-matches,--name-only}'[show only names of matching files]' \ '(-l --files-with-matches -L --files-without-match)'{-L,--files-without-match}'[show only names of non-matching files]' \ - '(--cached -O --open-files-in-pager)'{-O,--open-files-in-pager}'=-[open matching files in pager]::_path_commands' \ + '(--cached -O --open-files-in-pager)'{-O,--open-files-in-pager=}'-[open matching files in pager]:pager:_cmdstring' \ '(-z --null)'{-z,--null}'[output \0 after filenames]' \ '(-c --count)'{-c,--count}'[show number of matching lines in files]' \ '( --no-color)--color=-[color matches]:: :__git_color_whens' \ @@ -1846,9 +1846,6 @@ _git-config () { '(--no-includes)'--includes'[respect "include.*" directives in config files when looking up values]' \ '(--includes)'--no-includes'[do not respect "include.*" directives]' && ret=0 - # TODO: Most all _path_commands should be able to take arguments and so on. - # How do we deal with that and how do we quote the whole argument to git - # config? # TODO: Add support for merge.*. (merge driver), diff.*. (diff driver), and filter.*. (filter driver) options # (see gitattributes(5)). # TODO: .path options should take absolute paths. @@ -1891,7 +1888,7 @@ _git-config () { core.safecrlf:'verify that CRLF conversion is reversible::->core.safecrlf:false' core.autocrlf:'convert CRLFs to and from system specific::->core.autocrlf:false' core.symlinks:'create symbolic links for indexed symbolic links upon creation::->bool:true' - core.gitProxy:'command to execute to establish a connection to remote server:proxy command:_path_commands' + core.gitProxy:'command to execute to establish a connection to remote server:proxy command:_cmdstring' core.ignoreStat:'ignore modification times of files::->bool:false' core.preferSymlinkRefs:'use symbolic links for symbolic-reference files::->bool:false' core.bare:'use a repository without a working tree::->bool:false' @@ -1908,9 +1905,9 @@ _git-config () { core.deltaBaseCacheLimit:'maximum size of cache for base objects:maximum base objects cache size:->bytes:96m' core.bigFileThreshold:'maximum size of files to compress:maximum compress size:->bytes:512m' core.excludesfile:'additional file to use for exclusion:excludes file:_files' - core.askpass:'program to use for asking for passwords:password command:_path_commands' - core.editor:'editor to use for editing messages:editor:_path_commands' - core.pager:'pager to use for paginating output:pager:_path_commands' + core.askpass:'program to use for asking for passwords:password command:_cmdstring' + core.editor:'editor to use for editing messages:editor:_cmdstring' + core.pager:'pager to use for paginating output:pager:_cmdstring' core.whitespace:'list of common whitespace problems to notice::->core.whitespace' core.fsyncobjectfiles:'fsync() when writing object files::->bool:false' core.preloadindex:'use parallel index preload for operations like git diff::->bool:true' @@ -1918,10 +1915,10 @@ _git-config () { core.checkstat:'determine which stat fields to match between the index and work tree::->core.checkstat:default' core.notesRef:'show notes in given refs:refs:->string:refs/notes/commits' core.sparseCheckout:'use sparse checkout::->bool:false' - credential.helper:'external helper to be called when a username or password credential is needed::_path_commands' + credential.helper:'external helper to be called when a username or password credential is needed::_cmdstring' credential.useHttpPath:'consider the "path" component of an http or https URL to be important::->bool:false' credential.username:'If no username is set use this username by default:default username:->string' - 'credential.*.helper:external helper to be called when a username or password credential is needed::_path_commands' + 'credential.*.helper:external helper to be called when a username or password credential is needed::_cmdstring' 'credential.*.useHttpPath:consider the "path" component of an http or https URL to be important::->bool:false' 'credential.*.username:if no username is set use this username by default:default username:->string' add.ignore-errors:'ignore indexing errors when adding files::->bool:false' @@ -1936,7 +1933,7 @@ _git-config () { 'branch.*.mergeoptions:default options for merging::->branch.mergeoptions' 'branch.*.pushremote:what remote git push should push to::__git_remotes' 'branch.*.rebase:rebase on top of fetched branch::->bool:false' - 'browser.*.cmd:browser command to use:browser:_path_commands' + 'browser.*.cmd:browser command to use:browser:_cmdstring' 'browser.*.path:path to use for the browser:absolute browser path:_files -g "*(*)"' clean.requireForce:'require --force for git clean to actually do something::->bool:true' color.branch:'color output of git branch::->color-bool:false' @@ -1989,15 +1986,15 @@ _git-config () { commit.template:'template file for commit messages:template:_files' 'diff.*.binary:make the diff driver treat files as binary::->bool:false' 'diff.*.cachetextconv:make the diff driver cache the text conversion outputs::->bool:false' - 'diff.*.command:custom diff driver command::_path_commands' - 'diff.*.textconv:command to generate the text-converted version of a file::_path_commands' + 'diff.*.command:custom diff driver command::_cmdstring' + 'diff.*.textconv:command to generate the text-converted version of a file::_cmdstring' 'diff.*.wordregex:regular expression that the diff driver should use to split words in a line:regular expression:->string' 'diff.*.xfuncname:regular expression that the diff driver should use to recognize the hunk header:regular expression:->string' diff.algorithm:'default diff algorithm::->diff.algorithm:default' diff.autorefreshindex:'run git update-index --refresh before git diff::->bool:true' diff.context:'default number of context lines::->int:3' diff.dirstat:'comma separated list of --dirstat parameters specifying default behaviour:comma-separated list:->string:changes,noncumulative,3' - diff.external:'command to generate diff with:diff command:_path_commands' + diff.external:'command to generate diff with:diff command:_cmdstring' diff.mnemonicprefix:'use mnemonic source and destination prefixes::->bool:false' diff.noprefix:'strip source and destination prefixes::->bool:false' diff.orderfile:'file to read patch order glob patterns from:order file:_files' @@ -2008,7 +2005,7 @@ _git-config () { diff.submodule:'output format for submodule differences::->diff.submodule:short' diff.suppressBlankEmpty:'inhibit printing space before empty output lines::->bool:false' diff.tool:'diff tool to use::__git_difftools' - 'difftool.*.cmd:command to invoke for the diff tool::_path_commands' + 'difftool.*.cmd:command to invoke for the diff tool::_cmdstring' 'difftool.*.path:path to use for the diff tool:absolute diff tool path:_files -g "*(*)"' difftool.prompt:'prompt before each invocation of the diff tool::->bool:true' diff.wordRegex:'regex used to determine what a word is when performing word-by-word diff:regular expression:->string' @@ -2017,8 +2014,8 @@ _git-config () { fetch.unpackLimit:'maximum number of objects to unpack when fetching:unpack limit:->int' fetch.recurseSubmodules:'recurse into submodules (as needed) when fetching::->fetch.recurseSubmodules:on-demand' fetch.fsckObjects:'check all fetched objects::->bool:false' - 'filter.*.clean:command which is used to convert the content of a worktree file to a blob upon checkin::_path_commands' - 'filter.*.smudge:command which is used to convert the content of a blob object to a worktree file upon checkout::_path_commands' + 'filter.*.clean:command which is used to convert the content of a worktree file to a blob upon checkin::_cmdstring' + 'filter.*.smudge:command which is used to convert the content of a blob object to a worktree file upon checkout::_cmdstring' format.attach:'use multipart/mixed attachments::->bool:false' format.coverLetter:'control whether to generate a cover-letter when format-patch is invoked::->bool:false' format.numbered:'use sequence numbers in patch subjects::->format.numbered:auto' @@ -2061,7 +2058,7 @@ _git-config () { 'gitcvs.*.dbTableNamePrefix:database table name prefix:prefix:->string' gitcvs.usecrlfattr:'use end-of-line conversion attributes::->bool:false' gitcvs.allbinary:'treat all files from CVS as binary::->bool:false' - gpg.program:'use program instead of "gpg" found on $PATH when making or verifying a PGP signature::_path_commands' + gpg.program:'use program instead of "gpg" found on $PATH when making or verifying a PGP signature::_cmdstring' gui.commitmsgwidth:'width of commit message window:width::->int:75' gui.diffcontext:'number of context lines used in diff window:context::->int:5' gui.encoding:'encoding to use for displaying file contents::->encoding' @@ -2074,7 +2071,7 @@ _git-config () { gui.copyblamethreshold:'threshold to use in blame location detection:threshold:->string' gui.blamehistoryctx:'specify radius of history context in days for selected commit::->days' 'guitool.*.argprompt:prompt for arguments:argument prompt:->string' - 'guitool.*.cmd:shell command line to execute::_path_commands' + 'guitool.*.cmd:shell command line to execute::_cmdstring' 'guitool.*.confirm:show a confirmation dialog::->bool:false' 'guitool.*.needsfile:require that a diff is selected for command to be available::->bool:false' 'guitool.*.noconsole:suppress command output::->bool:false' @@ -2083,7 +2080,7 @@ _git-config () { 'guitool.*.prompt:prompt to display:prompt:->string' 'guitool.*.revunmerged:show only unmerged branches in revprompt::->bool:false' 'guitool.*.title:title of prompt dialog:prompt title:->string' - guitool.cmd:'shell command line to execute::_path_commands' + guitool.cmd:'shell command line to execute::_cmdstring' guitool.needsfile:'require that a diff is selected for command to be available::->bool:false' guitool.noconsole:'suppress command output::->bool:false' guitool.norescan:'skip rescanning for changes to the working directory::->bool:false' @@ -2150,7 +2147,7 @@ _git-config () { i18n.commitEncoding:'character encoding commit messages are stored in::->encoding' i18n.logOutputEncoding:'character encoding commit messages are output in::->encoding' imap.folder:'IMAP folder to use with git imap-send:IMAP folder name::_mailboxes' - imap.tunnel:'tunneling command to use for git imap-send:tunnel command:_path_commands' + imap.tunnel:'tunneling command to use for git imap-send:tunnel command:_cmdstring' imap.host:'host git imap-send should connect to::_hosts' # TODO: If imap.host is set, complete users on that system. imap.user:'user git imap-send should log in as::_users' @@ -2161,7 +2158,7 @@ _git-config () { imap.authMethod:'authentication method used::->imap.authMethod' init.templatedir:'directory from which templates are copied:template directory:_directories' instaweb.browser:'browser to use when browsing with gitweb::__git_browsers' - instaweb.httpd:'HTTP-daemon command-line to execute for instaweb:daemon:_path_commands' + instaweb.httpd:'HTTP-daemon command-line to execute for instaweb:daemon:_cmdstring' instaweb.local:'bind to 127.0.0.1::->bool:false' instaweb.modulepath:'module path for the Apache HTTP-daemon for instaweb:module directory:_directories' instaweb.port:'port to bind HTTP daemon to for instaweb::_ports' @@ -2175,7 +2172,7 @@ _git-config () { mailmap.blob:'like mailmap.file, but consider the value as a reference to a blob in the repository:blob reference:->string' mailmap.file:'augmenting mailmap file:mailmap file:_files' man.viewer:'man viewer to use for help in man format::__git_man_viewers' - 'man.*.cmd:the command to invoke the specified man viewer:man command:_path_commands' + 'man.*.cmd:the command to invoke the specified man viewer:man command:_cmdstring' 'man.*.path:path to use for the man viewer:absolute man tool path:_files -g "*(*)"' merge.branchdesc:'populate the log message with the branch description text as well::->bool:false' merge.conflictstyle:'style used for conflicted hunks::->merge.conflictstyle:merge' @@ -2188,10 +2185,10 @@ _git-config () { merge.tool:'tool used by git mergetool during merges::__git_mergetools' merge.verbosity:'amount of output shown by recursive merge strategy::->merge.verbosity:2' 'merge.*.name:human-readable name for custom low-level merge driver:name:->string' - 'merge.*.driver:command that implements a custom low-level merge driver:merge command:_path_commands' + 'merge.*.driver:command that implements a custom low-level merge driver:merge command:_cmdstring' 'merge.*.recursive:low-level merge driver to use when performing internal merge between common ancestors::__git_builtin_merge_drivers' 'mergetool.*.path:path to use for the merge tool:absolute merge tool path:_files -g "*(*)"' - 'mergetool.*.cmd:command to invoke for the merge tool:merge command:_path_commands' + 'mergetool.*.cmd:command to invoke for the merge tool:merge command:_cmdstring' 'mergetool.*.trustExitCode:trust the exit code of the merge tool::->bool:false' mergetool.keepBackup:'keep the original file with conflict markers::->bool:true' mergetool.keepTemporaries:'keep temporary files::->bool:false' @@ -2237,8 +2234,8 @@ _git-config () { 'remote.*.mirror:push with --mirror::->bool:false' 'remote.*.skipDefaultUpdate:skip this remote by default::->bool:false' 'remote.*.skipFetchAll:skip this remote by default::->bool:false' - 'remote.*.receivepack:default program to execute on remote when pushing:git receive-pack command:_path_commands' - 'remote.*.uploadpack:default program to execute on remote when fetching:git upload-pack command:_path_commands' + 'remote.*.receivepack:default program to execute on remote when pushing:git receive-pack command:_cmdstring' + 'remote.*.uploadpack:default program to execute on remote when fetching:git upload-pack command:_cmdstring' 'remote.*.tagopt:options for retrieving remote tags::->remote.tagopt' 'remote.*.vcs:interact with the remote through git-remote helper:remote VCS:->string' repack.usedeltabaseoffset:'use delta-base offsets::->bool:true' @@ -2251,8 +2248,8 @@ _git-config () { sendemail.annotate:'review and edit each patch you are about to send::->bool:false' sendemail.bcc:'value of Bcc\: header::_email_addresses' sendemail.cc:'value of Cc\: header::_email_addresses' - sendemail.cccmd:'command to generate Cc\: header with:Cc\: command:_path_commands' - sendemail.toccmd:'command to generate To\: header with:To\: command:_path_commands' + sendemail.cccmd:'command to generate Cc\: header with:Cc\: command:_cmdstring' + sendemail.toccmd:'command to generate To\: header with:To\: command:_cmdstring' sendemail.chainreplyto:'send each email as a reply to the previous one::->bool:false' sendemail.confirm:'type of confirmation required before sending::->sendemail.confirm:auto' sendemail.envelopesender:'envelope sender to send emails as::_email_addresses' @@ -2276,8 +2273,8 @@ _git-config () { 'sendemail.*.annotate:review and edit each patch you are about to send::bool->false' 'sendemail.*.bcc:value of Bcc\: header::_email_addresses' 'sendemail.*.cc:value of Cc\: header::_email_addresses' - 'sendemail.*.cccmd:command to generate Cc\: header with:Cc\: command:_path_commands' - 'sendemail.*.tocmd:command to generate To\: header with:To\: command:_path_commands' + 'sendemail.*.cccmd:command to generate Cc\: header with:Cc\: command:_cmdstring' + 'sendemail.*.tocmd:command to generate To\: header with:To\: command:_cmdstring' 'sendemail.*.chainreplyto:send each email as a reply to the previous one::->bool:false' 'sendemail.*.confirm:type of confirmation required before sending::->sendemail.confirm:auto' 'sendemail.*.envelopesender:envelope sender to send emails as::_email_addresses' @@ -2296,7 +2293,7 @@ _git-config () { 'sendemail.*.thread:set In-Reply-To\: and References\: headers::->bool:true' 'sendemail.*.validate:perform sanity checks on patches::->bool:true' sendemail.assume8bitEncoding:'encoding to use for non-ASCII messages::__git_encodings' - sequence.editor:'text editor used by git rebase -i::_path_commands' + sequence.editor:'text editor used by git rebase -i::_cmdstring' showbranch.default:'default set of branches for git show-branch::->branch' status.relativePaths:'show paths relative to current directory::->bool:false' status.showUntrackedFiles:'show untracked files::->status.showUntrackedFiles:normal' @@ -2331,7 +2328,7 @@ _git-config () { 'svn-remote.*.branches:branch mappings:branch mapping:->string' 'svn-remote.*.tags:tag mappings:tag mapping:->string' tag.sort:'Default sorting method:->string' - 'tar.*.command:specify a shell command through which the tar output generated by git archive should be piped::_path_commands' + 'tar.*.command:specify a shell command through which the tar output generated by git archive should be piped::_cmdstring' 'tar.*.remote:enable <format> for use by remote clients via git-upload-archive::->bool' tar.umask:'umask to apply::->umask' transfer.unpackLimit:'default value for fetch.unpackLimit and receive.unpackLimit:unpack limit::->int:100' @@ -2994,13 +2991,13 @@ _git-filter-branch () { # such. # TODO: * should be git-rev-arg and git-rev-list arguments. _arguments -S -A '-*' \ - '--env-filter[filter for modifying environment in which commit will be performed]: :_path_commands' \ - '--tree-filter[filter for rewriting tree and its contents]: :_path_commands' \ - '--index-filter[filter for rewriting index]: :_path_commands' \ - '--parent-filter[filter for rewriting parent list of commit]: :_path_commands' \ - '--msg-filter[filter for rewriting commit messages]: :_path_commands' \ - '--commit-filter[filter for rewriting commit]: :_path_commands' \ - '--tag-name-filter[filter for rewriting tag names]: :_path_commands' \ + '--env-filter[filter for modifying environment in which commit will be performed]: :_cmdstring' \ + '--tree-filter[filter for rewriting tree and its contents]: :_cmdstring' \ + '--index-filter[filter for rewriting index]: :_cmdstring' \ + '--parent-filter[filter for rewriting parent list of commit]: :_cmdstring' \ + '--msg-filter[filter for rewriting commit messages]: :_cmdstring' \ + '--commit-filter[filter for rewriting commit]: :_cmdstring' \ + '--tag-name-filter[filter for rewriting tag names]: :_cmdstring' \ '--subdirectory-filter[only look at histor that touches given directory]: :_directories' \ '--prune-empty[ignore empty generated commits]' \ '--original[namespace where original commits will be stored]:namespace:_directories' \ @@ -3340,7 +3337,7 @@ _git-difftool () { '(-y --no-prompt --prompt)'{-y,--no-prompt}'[do not prompt before invocation of diff tool]' \ '(-y --no-prompt)--prompt[prompt before invocation of diff tool]' \ '(-t --tool -x --extcmd)'{-t,--tool=-}'[merge resolution program to use]: :__git_difftools' \ - '(-t --tool -x --extcmd)'{-x,--extcmd=-}'[custom diff command to use]: :_path_commands' \ + '(-t --tool -x --extcmd)'{-x,--extcmd=-}'[custom diff command to use]: :_cmdstring' \ '--tool-help[print a list of diff tools that may be used with --tool]' \ '(--symlinks)--no-symlinks[make copies of instead of symlinks to the working tree]' \ '(---no-symlinks)--symlinks[make symlinks to instead of copies of the working tree]' \ @@ -3713,8 +3710,8 @@ _git-send-email () { '--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-debug=[enable or disable debug output]:smtp debug:((0\:"disable" 1\:"enable"))' \ - '--cc-cmd=[specify command to generate Cc\: header with]:Cc\: command:_path_commands' \ - '--to-cmd=[specify command to generate To\: header with]:To\: command:_path_commands' \ + '--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]' \ '(--chain-reply-to )--no-chain-reply-to[send all emails after first as replies to first one]' \ '--identity=[specify configuration identity]: :__git_sendemail_identities' \ @@ -3805,7 +3802,7 @@ _git-svn () { '( --no-follow-parent)--follow-parent[follow parent commit]' '(--follow-parent )--no-follow-parent[do not follow parent commit]' '(-A --authors-file)'{-A,--authors-file}'[specify author-conversion file]:author-conversion file:_files' - '--authors-prog=[program used to generate authors]: :_path_commands' + '--authors-prog=[program used to generate authors]: :_cmdstring' '(-q --quiet)'{-q,--quiet}'[make git-svn less verbose]' '--repack=[repack files (for given number of revisions)]:: :__git_guard_number "revision limit"' '(--repack-flags --repack-args --repack-opts)'{--repack-flags=,--repack-args=,--repack-opts=}'[flags to pass to git-repack]:git-repack flags' @@ -3930,7 +3927,7 @@ _git-svn () { '--incremental[give output suitable for concatenation]' '--show-commit[output git commit SHA-1, as well]' '--color[undocumented]' - '--pager[undocumented]:pager:_path_commands' + '--pager[undocumented]:pager:_cmdstring' '--non-recursive[undocumented]') ;; (blame) diff --git a/Completion/X/Command/_matlab b/Completion/X/Command/_matlab index e912b68c1..0a52b9df5 100644 --- a/Completion/X/Command/_matlab +++ b/Completion/X/Command/_matlab @@ -2,18 +2,22 @@ _arguments : \ {-h,-help}'[display arguments]' \ - '(-e)-n[display final environment variables, and exit]' \ - '(-n)-e[display ALL the environment variables and values, and exit]' \ + '(-)-n[display final environment variables, and exit]' \ + '(-)-e[display all environment variables and values, and exit]' \ '-arch[start MATLAB assuming architecture arch]:architecture:' \ '-c[set location of the license file]:licensefile:_files' \ '(-nodisplay)-display:display:_x_display' \ '(-display)-nodisplay[do not display any X commands]' \ '-nosplash[do not display the splash screen during startup]' \ '-mwvisual[the default X visual to use for figure windows]:visualid:' \ + '(-nosoftwareopengl)-softwareopengl' '(-softwareopengl)-nosoftwareopengl' \ + '-singleCompThread[limit to single computational thread]' \ '-debug[provide debugging information especially for X based problems]' \ '(-nodesktop -nojvm)-desktop[allow the MATLAB desktop to be started by a process without a controlling terminal]' \ '(-desktop -nojvm)-nodesktop[do not start the MATLAB desktop]' \ '(-nodesktop -desktop)-nojvm[shut off all Java support by not starting the Java virtual machine]' \ + '-jdb[enable remote java debugging]::port [4444]:_ports' \ '-r[start MATLAB and execute the MATLAB_command]:MATLAB_command:' \ - '-logfile[make a copy of any output to the command window in file log]:log file:' \ - '-D-:debugger:_path_commands' + '-logfile[copy any command window output to a file]:log file:_files' \ + '-D-:debugger:_command_names -e' \ + '-nouserjavapath[ignore custom javaclasspath.txt and javalibrarypath.txt files]' diff --git a/Config/version.mk b/Config/version.mk index ece66f6e1..defcf262e 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.7-dev-4 -VERSION_DATE='May 27, 2015' +VERSION=5.0.8 +VERSION_DATE='May 31, 2015' diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index a2c03bcc4..1fcc7c2b7 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -662,8 +662,8 @@ findex(fc) cindex(history, editing) cindex(editing history) redef(SPACES)(0)(tt(ifztexi(NOTRANS(@ @ @ @ @ @ ))ifnztexi( ))) -xitem(tt(fc) [ tt(-e) var(ename) ] [ tt(-m) var(match) ] [ var(old)tt(=)var(new) ... ] [ var(first) [ var(last) ] ]) -xitem(tt(fc -l )[ tt(-nrdfEiD) ] [ tt(-t) var(timefmt) ] [ tt(-m) var(match) ]) +xitem(tt(fc) [ tt(-e) var(ename) ] [-L] [ tt(-m) var(match) ] [ var(old)tt(=)var(new) ... ] [ var(first) [ var(last) ] ]) +xitem(tt(fc -l )[ tt(-LnrdfEiD) ] [ tt(-t) var(timefmt) ] [ tt(-m) var(match) ]) xitem(SPACES()[ var(old)tt(=)var(new) ... ] [ var(first) [ var(last) ] ]) xitem(tt(fc -p )[ tt(-a) ] [ var(filename) [ var(histsize) [ var(savehistsize) ] ] ]) xitem(tt(fc) tt(-P)) @@ -683,11 +683,15 @@ A string specifies the most recent event beginning with the given string. All substitutions var(old)tt(=)var(new), if any, are then performed on the commands. -If the tt(-l) flag is given, the resulting commands are listed on -standard output. -If the tt(-m) flag is also given the first argument is taken as a +If the tt(-L) flag is given, only the local history is considered (see +tt(SHARE_HISTORY) in ifzman(zmanref(zshoptions))\ +ifnzman(noderef(Description of Options))). +If the tt(-m) flag is given, the first argument is taken as a pattern (should be quoted) and only the history events matching this -pattern will be shown. +pattern are considered. + +When the tt(-l) flag is given, the resulting commands are listed on +standard output. Otherwise the editor program var(ename) is invoked on a file containing these history events. If var(ename) is not given, the value of the parameter tt(FCEDIT) is used; if that is not set the value of the @@ -866,7 +870,8 @@ vindex(OPTARG, use of) The first option to be examined may be changed by explicitly assigning to tt(OPTIND). tt(OPTIND) has an initial value of tt(1), and is -normally reset to tt(1) upon exit from a shell function. tt(OPTARG) +normally set to tt(1) upon entry to a shell function and restored +upon exit (this is disabled by the tt(POSIX_BUILTINS) option). tt(OPTARG) is not reset and retains its value from the most recent call to tt(getopts). If either of tt(OPTIND) or tt(OPTARG) is explicitly unset, it remains unset, and the index or option argument is not diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo index afd6b1ff9..7d4e6fccb 100644 --- a/Doc/Zsh/expn.yo +++ b/Doc/Zsh/expn.yo @@ -777,6 +777,13 @@ This has the side-effect that joining is skipped even in quoted forms, which may affect other sub-expressions in var(spec). Note that `tt(^)', `tt(=)', and `tt(~)', below, must appear to the left of `tt(#)' when these forms are combined. + +If the option tt(POSIX_IDENTIFIERS) is not set, and var(spec) is a +simple name, then the braces are optional; this is true even +for special parameters so e.g. tt($#-) and tt($#*) take the length +of the string tt($-) and the array tt($*) respectively. If +tt(POSIX_IDENTIFIERS) is set, then braces are required for +the tt(#) to be treated in this fashion. ) item(tt(${^)var(spec)tt(}))( pindex(RC_EXPAND_PARAM, toggle) diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo index 032423def..4dd68c9cb 100644 --- a/Doc/Zsh/options.yo +++ b/Doc/Zsh/options.yo @@ -2038,6 +2038,10 @@ tt(unset). In addition, various error conditions associated with the above builtins or tt(exec) cause a non-interactive shell to exit and an interactive shell to return to its top-level processing. + +Furthermore, the tt(getopts) builtin behaves in a POSIX-compatible +fashion in that the associated variable tt(OPTIND) is not made +local to functions. ) pindex(POSIX_IDENTIFIERS) pindex(NO_POSIX_IDENTIFIERS) @@ -2050,6 +2054,13 @@ When this option is set, only the ASCII characters tt(a) to tt(z), tt(A) to tt(Z), tt(0) to tt(9) and tt(_) may be used in identifiers (names of shell parameters and modules). +In addition, setting this option limits the effect of parameter +substitution with no braces, so that the expression tt($#) is treated as +the parameter tt($#) even if followed by a valid parameter name. +When it is unset, zsh allows expresions of the form tt($#)var(name) +to refer to the length of tt($)var(name), even for special variables, +for example in expressions such as tt($#-) and tt($#*). + When the option is unset and multibyte character support is enabled (i.e. it is compiled in and the option tt(MULTIBYTE) is set), then additionally any alphanumeric characters in the local character set may be used in diff --git a/Doc/Zsh/zftpsys.yo b/Doc/Zsh/zftpsys.yo index 00062e43d..349039edc 100644 --- a/Doc/Zsh/zftpsys.yo +++ b/Doc/Zsh/zftpsys.yo @@ -283,7 +283,7 @@ semantics, since `tt(/)' is used as a directory separator. ) findex(zfuput) item(tt(zfuput) [ tt(-vs) ] var(file1) ...)( -As tt(zfput), but only send files which are newer than their local +As tt(zfput), but only send files which are newer than their remote equivalents, or if the remote file does not exist. The logic is the same as for tt(zfuget), but reversed between local and remote files. ) diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo index 4ec626fd3..c23dff5b2 100644 --- a/Etc/FAQ.yo +++ b/Etc/FAQ.yo @@ -55,10 +55,10 @@ myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2010/02/15) COMMENT(-- the following are for Usenet and must appear first)\ description(\ mydit(Archive-Name:) unix-faq/shell/zsh -mydit(Last-Modified:) 2012/06/15 +mydit(Last-Modified:) 2015/05/31 mydit(Submitted-By:) email(coordinator@zsh.org (Peter Stephenson)) mydit(Posting-Frequency:) Monthly -mydit(Copyright:) (C) P.W. Stephenson, 1995--2010 (see end of document) +mydit(Copyright:) (C) P.W. Stephenson, 1995--2015 (see end of document) ) This document contains a list of frequently-asked (or otherwise diff --git a/Functions/Zftp/zfget_match b/Functions/Zftp/zfget_match index 3a33c9886..a440cace1 100644 --- a/Functions/Zftp/zfget_match +++ b/Functions/Zftp/zfget_match @@ -9,17 +9,31 @@ if [[ $1 == $HOME || $1 == $HOME/* ]]; then fi if [[ $ZFTP_SYSTEM == UNIX* && $1 == */* ]]; then - setopt localoptions clobber + setopt localoptions clobber extendedglob local tmpf=${TMPPREFIX}zfgm$$ zf_ln -fn =(<<<'') $tmpf || return 1 if [[ -n $WIDGET ]]; then - local dir=${1:h} + local dir=${1%/*} [[ $dir = */ ]] || dir="$dir/" zftp ls -LF $dir >$tmpf - local reply - reply=(${${${(f)"$(<$tmpf)"}##$dir}%\*}) - _wanted files expl 'remote file' compadd -P $dir - $reply + local reply1 reply2 + + # dirs in reply1, files in reply2 + reply1=(${${(M)${${(f)"$(<$tmpf)"}##$dir}:#*/}%/}) + reply2=(${${${${(f)"$(<$tmpf)"}##$dir}%\*}:#*/}) + + # try dir if ls -F doesn't work + if ! (($#reply1)); then + zftp dir $dir >$tmpf + reply1=(${(M)${(f)"$(<$tmpf)"}:#d([^[:space:]]##[[:space:]]##)(#c8)?##}) + reply1=(${reply1/(#b)d([^[:space:]]##[[:space:]]##)(#c8)([^\/]##)\/#/$match[2]}) + + reply2=(${${(f)"$(<$tmpf)"}:#d([^[:space:]]##[[:space:]]##)(#c8)?##}) + reply2=(${reply2/(#b)([^[:space:]]##[[:space:]]##)(#c8)(?##)/$match[2]}) + fi + _wanted directories expl 'remote directory' compadd -S/ -q -P $dir - $reply1 + _wanted files expl 'remote file' compadd -P $dir - $reply2 else # On the first argument to ls, we usually get away with a glob. zftp ls "$1*$2" >$tmpf diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c index 55157a90c..04d448529 100644 --- a/Src/Modules/parameter.c +++ b/Src/Modules/parameter.c @@ -410,11 +410,6 @@ getfunction(UNUSED(HashTable ht), const char *name, int dis) } else h = dyncat(start, t); zsfree(t); - /* - * TBD: Is this unmetafy correct? Surely as this - * is a parameter value it stays metafied? - */ - unmetafy(h, NULL); if (shf->redir) { t = getpermtext(shf->redir, NULL, 1); diff --git a/Src/builtin.c b/Src/builtin.c index a9afb4540..9358e8b1f 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -69,7 +69,7 @@ static struct builtin builtins[] = * But that's actually not useful, so it's more consistent to * cause an error. */ - BUILTIN("fc", 0, bin_fc, 0, -1, BIN_FC, "aAdDe:EfiIlmnpPrRt:W", NULL), + BUILTIN("fc", 0, bin_fc, 0, -1, BIN_FC, "aAdDe:EfiIlLmnpPrRt:W", NULL), BUILTIN("fg", 0, bin_fg, 0, -1, BIN_FG, NULL, NULL), BUILTIN("float", BINF_PLUSOPTS | BINF_MAGICEQUALS | BINF_PSPECIAL, bin_typeset, 0, -1, 0, "E:%F:%HL:%R:%Z:%ghlprtux", "E"), BUILTIN("functions", BINF_PLUSOPTS, bin_functions, 0, -1, 0, "kmMtTuUz", NULL), @@ -81,7 +81,7 @@ static struct builtin builtins[] = BUILTIN("hashinfo", 0, bin_hashinfo, 0, 0, 0, NULL, NULL), #endif - BUILTIN("history", 0, bin_fc, 0, -1, BIN_FC, "adDEfimnpPrt:", "l"), + BUILTIN("history", 0, bin_fc, 0, -1, BIN_FC, "adDEfiLmnpPrt:", "l"), BUILTIN("integer", BINF_PLUSOPTS | BINF_MAGICEQUALS | BINF_PSPECIAL, bin_typeset, 0, -1, 0, "HL:%R:%Z:%ghi:%lprtux", "i"), BUILTIN("jobs", 0, bin_fg, 0, -1, BIN_JOBS, "dlpZrs", NULL), BUILTIN("kill", BINF_HANDLES_OPTS, bin_kill, 0, -1, 0, NULL, NULL), @@ -104,7 +104,7 @@ static struct builtin builtins[] = BUILTIN("pushd", BINF_SKIPINVALID | BINF_SKIPDASH | BINF_DASHDASHVALID, bin_cd, 0, 2, BIN_PUSHD, "qsPL", NULL), BUILTIN("pushln", 0, bin_print, 0, -1, BIN_PRINT, NULL, "-nz"), BUILTIN("pwd", 0, bin_pwd, 0, 0, 0, "rLP", NULL), - BUILTIN("r", 0, bin_fc, 0, -1, BIN_R, "nrl", NULL), + BUILTIN("r", 0, bin_fc, 0, -1, BIN_R, "nrlL", NULL), BUILTIN("read", 0, bin_read, 0, -1, 0, "cd:ek:%lnpqrst:%zu:AE", NULL), BUILTIN("readonly", BINF_PLUSOPTS | BINF_MAGICEQUALS | BINF_PSPECIAL, bin_typeset, 0, -1, 0, "AE:%F:%HL:%R:%TUZ:%afghi:%lptux", "r"), BUILTIN("rehash", 0, bin_hash, 0, 0, 0, "df", "r"), @@ -1689,9 +1689,6 @@ fclist(FILE *f, Options ops, zlong first, zlong last, fclose(f); return 1; } - /* suppress "no substitution" warning if no substitution is requested */ - if (!subs) - fclistdone = 1; ent = gethistent(first, first < last? GETHIST_DOWNWARD : GETHIST_UPWARD); if (!ent || (first < last? ent->histnum > last : ent->histnum < last)) { @@ -1726,11 +1723,14 @@ fclist(FILE *f, Options ops, zlong first, zlong last, } for (;;) { - s = dupstring(ent->node.nam); + if (!OPT_ISSET(ops,'L') || !(ent->node.flags & HIST_FOREIGN)) + s = dupstring(ent->node.nam); + else + s = NULL; /* this if does the pattern matching, if required */ - if (!pprog || pattry(pprog, s)) { + if (s && (!pprog || pattry(pprog, s))) { /* perform substitution */ - fclistdone |= fcsubs(&s, subs); + fclistdone |= (subs ? fcsubs(&s, subs) : 1); /* do numbering */ if (!OPT_ISSET(ops,'n')) { @@ -1780,7 +1780,10 @@ fclist(FILE *f, Options ops, zlong first, zlong last, if (f != stdout) fclose(f); if (!fclistdone) { - zwarnnam("fc", "no substitutions performed"); + if (subs) + zwarnnam("fc", "no substitutions performed"); + else if (OPT_ISSET(ops,'L') || pprog) + zwarnnam("fc", "no matching events found"); return 1; } return 0; @@ -4713,6 +4716,10 @@ bin_shift(char *name, char **argv, Options ops, UNUSED(int func)) return ret; } +/* + * Position of getopts option within OPTIND argument with multiple options. + */ + /**/ int optcind; diff --git a/Src/exec.c b/Src/exec.c index 527d61197..9f163a627 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -4910,9 +4910,11 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval) if (!(flags & PM_UNDEFINED)) scriptname = dupstring(name); oldzoptind = zoptind; - zoptind = 1; oldoptcind = optcind; - optcind = 0; + if (!isset(POSIXBUILTINS)) { + zoptind = 1; + optcind = 0; + } /* We need to save the current options even if LOCALOPTIONS is * * not currently set. That's because if it gets set in the * @@ -5049,8 +5051,10 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval) argzero = oargv0; } pparams = pptab; - optcind = oldoptcind; - zoptind = oldzoptind; + if (!isset(POSIXBUILTINS)) { + zoptind = oldzoptind; + optcind = oldoptcind; + } scriptname = oldscriptname; oflags = ooflags; diff --git a/Src/parse.c b/Src/parse.c index 06cea744e..c932851d9 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -2212,13 +2212,14 @@ par_cond_2(void) { char *s1, *s2, *s3; int dble = 0; + int n_testargs = (condlex == testlex) ? arrlen(testargs) + 1 : 0; - if (condlex == testlex) { + if (n_testargs) { /* See the description of test in POSIX 1003.2 */ if (tok == NULLTOK) /* no arguments: false */ return par_cond_double(dupstring("-n"), dupstring("")); - if (!*testargs) { + if (n_testargs == 1) { /* one argument: [ foo ] is equivalent to [ -n foo ] */ s1 = tokstr; condlex(); @@ -2227,7 +2228,7 @@ par_cond_2(void) return par_cond_double(s1, dupstring("1")); return par_cond_double(dupstring("-n"), s1); } - if (testargs[1]) { + if (n_testargs > 2) { /* three arguments: if the second argument is a binary operator, * * perform that binary test on the first and the third argument */ if (!strcmp(*testargs, "=") || @@ -2253,7 +2254,7 @@ par_cond_2(void) * In "test" compatibility mode, "! -a ..." and "! -o ..." * are treated as "[string] [and] ..." and "[string] [or] ...". */ - if (!(condlex == testlex && *testargs && + if (!(n_testargs > 1 && (!strcmp(*testargs, "-a") || !strcmp(*testargs, "-o")))) { condlex(); @@ -2277,19 +2278,27 @@ par_cond_2(void) } s1 = tokstr; dble = (s1 && *s1 == '-' - && (condlex != testlex + && (!n_testargs || strspn(s1+1, "abcdefghknoprstuwxzLONGS") == 1) && !s1[2]); if (tok != STRING) { /* Check first argument for [[ STRING ]] re-interpretation */ if (s1 /* tok != DOUTBRACK && tok != DAMPER && tok != DBAR */ - && tok != LEXERR && (!dble || condlex == testlex)) { + && tok != LEXERR && (!dble || n_testargs)) { condlex(); return par_cond_double(dupstring("-n"), s1); } else YYERROR(ecused); } condlex(); + if (n_testargs == 2 && tok != STRING && tokstr && s1[0] == '-') { + /* + * Something like "test -z" followed by a token. + * We'll turn the token into a string (we've also + * checked it does have a string representation). + */ + tok = STRING; + } if (tok == INANG || tok == OUTANG) { enum lextok xtok = tok; condlex(); @@ -2308,7 +2317,7 @@ par_cond_2(void) * mean we have to go back and fix up the first one */ if (tok != LEXERR) { - if (!dble || condlex == testlex) + if (!dble || n_testargs) return par_cond_double(dupstring("-n"), s1); else return par_cond_multi(s1, newlinklist()); @@ -2316,7 +2325,7 @@ par_cond_2(void) YYERROR(ecused); } s2 = tokstr; - if (condlex != testlex) + if (!n_testargs) dble = (s2 && *s2 == '-' && !s2[2]); incond++; /* parentheses do globbing */ condlex(); diff --git a/Src/subst.c b/Src/subst.c index d4a04b8e5..81d34d28a 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -2156,6 +2156,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags) nojoin = !(ifs && *ifs); } } else if ((c == '#' || c == Pound) && + (inbrace || !isset(POSIXIDENTIFIERS)) && (itype_end(s+1, IIDENT, 0) != s + 1 || (cc = s[1]) == '*' || cc == Star || cc == '@' || cc == '?' || cc == Quest diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst index 6581b9d6b..02fa4d473 100644 --- a/Test/C02cond.ztst +++ b/Test/C02cond.ztst @@ -374,6 +374,20 @@ F:Failures in these cases do not indicate a problem in the shell. >foo is empty >foo is full + test -z \( || print Not zero 1 + test -z \< || print Not zero 2 + test -n \( && print Not zero 3 + test -n \) && print Not zero 4 + [ -n \> ] && print Not zero 5 + [ -n \! ] && print Not zero 6 +0:test with two arguments and a token +>Not zero 1 +>Not zero 2 +>Not zero 3 +>Not zero 4 +>Not zero 5 +>Not zero 6 + %clean # This works around a bug in rm -f in some versions of Cygwin chmod 644 unmodish diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index d96ffb64f..d06a73afd 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -1703,3 +1703,11 @@ funnychars='The qu*nk br!wan f@x j/mps o[]r \(e la~# ^"&;' [[ $funnychars = ${~${(b)funnychars}} ]] 0:${(b)...} quoting protects from GLOB_SUBST + + set -- foo + echo $(( $#*3 )) + emulate sh -c 'nolenwithoutbrace() { echo $#-1; }' + nolenwithoutbrace +0:Avoid confusion after overloaded characters in braceless substitution in sh +>13 +>0-1 |