diff options
author | Bart Schaefer <schaefer@ipost.com> | 2021-04-18 13:58:09 -0700 |
---|---|---|
committer | Bart Schaefer <schaefer@ipost.com> | 2021-04-18 13:58:09 -0700 |
commit | 82ff9f24f170eea7daa935fdaa09ab75a2f277ff (patch) | |
tree | cef3fef19fbe032466fcfbe50b7b6aa0878300a5 /Doc/Zsh/params.yo | |
parent | 56ccb4a975bc87dd10bbbd6a1cfc296d6e2203b4 (diff) | |
download | zsh-82ff9f24f170eea7daa935fdaa09ab75a2f277ff.tar.gz zsh-82ff9f24f170eea7daa935fdaa09ab75a2f277ff.tar.xz zsh-82ff9f24f170eea7daa935fdaa09ab75a2f277ff.zip |
48560: add TYPESET_TO_UNSET option to remove initialization of parameters
Changes typeset such that ${newparam-notset} yields "notset" and "typeset -p newparam" does not show an assignment to the parameter. This is similar to the default behavior of bash and ksh, with minor differences in typeset output. Also add tests for some POSIX incompatibilities plus minor changes for test harness robustness.
Diffstat (limited to 'Doc/Zsh/params.yo')
-rw-r--r-- | Doc/Zsh/params.yo | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo index 36c1ae4c2..a9044336f 100644 --- a/Doc/Zsh/params.yo +++ b/Doc/Zsh/params.yo @@ -393,6 +393,11 @@ is compared to the pattern, and the first matching key found is the result. On failure substitutes the length of the array plus one, as discussed under the description of `tt(r)', or the empty string for an associative array. + +Note: Although `tt(i)' may be applied to a scalar substitution to find +the offset of a substring, the results are likely to be misleading when +searching within substitutions that yield an empty string, or when +searching for the empty substring. ) item(tt(I))( Like `tt(i)', but gives the index of the last match, or all possible |