1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-06-28 12:41:00 +02:00
Commit graph

449 commits

Author SHA1 Message Date
Bart Schaefer
8d009d35a9 51510: Skip namespaces in "set"/"typeset" output, add tests, fix bug 2023-03-06 20:01:04 -08:00
Bart Schaefer
d2768f2f88 51431: "typeset -p" shouldn't change parameter flags 2023-02-20 10:32:40 -08:00
Bart Schaefer
03887bb03f 51430: Misc. problems with typeset and $parameters
* Fix and test for regression of assignment when using typeset command
* Fix output of typeset +m and $parameters[ref]
* Prevent segfault in typeset
2023-02-13 18:20:11 -08:00
Bart Schaefer
3eed6f70cd 51402: Some ksh/bash features, additional sanity checking
* Add "unset -n"
* Allow and enforce "typeset -n -r" for read-only references
* "can't change type via subscript reference" error
* Better checking for self-referential declarations/assignments
* Ksh-style "foo=bar; typeset -n foo" creates foo=bar reference
* Support "typeset -n ref; for ref in ..."
* Subscripted references use NO_EXEC for safety
* References assigned in called scopes reset scope at end
* Allow named references to $! $? $$ $- $0 $_
2023-02-12 11:51:41 -08:00
Bart Schaefer
511e020c68 51360: Initial implementation of named references. 2023-02-12 11:21:23 -08:00
Oliver Kiddle
667ead3a64 51258, 51272: refactor handling of terminal attributes, removing OFF flags in zattr 2023-01-10 20:53:17 +01:00
Oliver Kiddle
35a2f155c3 51214: handle read -d and a delimiter that can't be decoded into a character
Terminate input at the raw byte value of the delimiter.
Also document and test the use of an empty string as a way to specify
NUL as the delimiter.
2022-12-17 00:37:19 +01:00
Jun-ichi Takimoto
2701ab161d 51207: fix for read -d when the delimiter is a byte >= 0x80 2022-12-17 00:35:36 +01:00
Oliver Kiddle
a73c705b0c 51212: remove STOUC() macro
This served as a workaround for ancient compilers where casts to
unsigned char were broken.
2022-12-16 23:28:10 +01:00
Matthew Martin
d4955bc0f9 50359: fix bad sticky-emulation in "functions -c" 2022-06-09 13:37:51 -07:00
Bart Schaefer
d24ab95469 50351: "functions -c" can set signal traps 2022-06-09 13:30:55 -07:00
Bart Schaefer
e127ceaae8 50149: Remove all remaining =(...) files at shell exit 2022-04-30 11:21:03 -07:00
Bart Schaefer
d24d7242fe 50068: 'exit' in trap causes calling function to return 2022-04-14 16:31:50 -07:00
Oliver Kiddle
271cfc685b 49534, 49539: separate watch/log functionality out into a module 2021-11-02 21:41:53 +01:00
Jun-ichi Takimoto
2b81d4be32 unposted: add/remove UNUSED() for some function parameters 2021-09-08 11:58:29 +09:00
Bart Schaefer
5b4a1626c2 49069: literal interpretation of subscripts for unset of array/hash elements 2021-06-13 16:30:06 -07:00
Bart Schaefer
cf5c4828d1 48857: declare "volatile" all globals that may be modified by signal handlers 2021-05-16 19:51:11 -07:00
Peter Stephenson
db36149006 users/26742: break out of surrounding shell loops when exit is called from an exit hook 2021-05-15 13:59:17 -07:00
dana
c23a0d84b0 48614: getopts: Calculate OPTIND according to POSIX_BUILTINS 2021-05-03 18:11:38 -05:00
Bart Schaefer
71b747567e 47704: POSIX export and readonly ignore "-p" when parameter names also appear 2021-04-18 14:26:12 -07:00
Bart Schaefer
82ff9f24f1 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.
2021-04-18 13:58:09 -07:00
Peter Stephenson
6bef719302 users/26509: fix for r -L
fc with the -L option should ignore remote entires, rather than
reading them and treating them as an error.
2021-02-18 21:37:08 +00:00
Martijn Dekker
9c0533931c 48073: Add fc -s as POSIX way of rerunning command without starting editor 2021-02-17 10:21:08 +00:00
Bart Schaefer
465738fc25 47895: Remove trailing spaces from "print -ac" output lines. 2021-02-04 17:52:22 -08:00
Jun-ichi Takimoto
b6ba74cd4e 47301: Fix print -v metafication 2020-10-25 23:05:19 +01:00
Matthew Martin
4e471c3f89 46168: Update $PWD and call chpwd hook after normalizing path 2020-07-03 21:17:58 -05:00
Mikael Magnusson
ed23768f77 typeset: Fix leaving corrupted entries in paramtab 2020-06-05 15:42:31 +02:00
Daniel Shahaf
4d2bcf2fe7 45729: internal: Add a second parameter to zlinklist2array(), analogously to hlinklist2array().
Will be used in the next commit.
2020-05-03 01:27:36 +00:00
Peter Stephenson
66ee4918a1 45660: Fix crash setting vi or emacs mode on command line.
Delay setting the option until the module system is set up.
2020-04-09 21:46:20 +01:00
Peter Stephenson
a6a1b28b98 45487: Missing mod_export declarations for AIX 2020-02-24 10:55:48 +00:00
Daniel Shahaf
faa476a4ed 45302: bin_umask(): Queue signals around umask().
Otherwise, a signal handler might create files while the temporary umask
is in effect.
2020-01-15 19:49:45 +00:00
Daniel Shahaf
ae7e291873 45066: internal: Document forklevel, locallevel, and exit_pending. 2019-12-18 06:01:50 +00:00
Daniel Shahaf
8bc4400762 45058: internal: Add symbolic names to possible values of zexit()'s "from_where" parameter. No functional change. 2019-12-17 05:12:36 +00:00
Daniel Shahaf
06c2a625b3 unposted: Update comment to reflect variable rename in 41012 (= zsh-5.3.1-182-gd7110d8f0). 2019-12-17 02:46:32 +00:00
Peter Stephenson
cb4dc95643 45009: POSIX_CD needs to suppress some forms of option.
Otherwise forms of argument allowed by POSIX are interpreted as
options instead.
2019-12-12 10:47:00 +00:00
Martijn Dekker
c578f0a08b 45004: Fix typos in comments 2019-12-11 02:37:39 +00:00
Daniel Shahaf
72c6dbe1be unposted: functions -c: Fix typo 2019-10-10 03:45:02 +00:00
Peter Stephenson
4fae525726 Copy functions using functions -c old new.
Documentation and test.
2019-08-03 19:53:51 +01:00
Bart Schaefer
5415e1d4df 44502: Quote function name for "autoload -X" 2019-07-08 17:56:57 -07:00
Martijn Dekker
700ec49581 44469: correct error on missing option argument 2019-07-01 09:42:22 +01:00
Martijn Dekker
1b1cb44161 44443: POSIX allows exporting readonly variables 2019-06-23 18:36:50 +01:00
Oliver Kiddle
fae7c85331 44284: combination of -T and -p to typeset crashed the shell. 2019-05-14 23:36:59 +02:00
Oliver Kiddle
d66fd7fcf5 44291: printf with argument specifier out of range for an int crashed the shell 2019-05-14 23:18:32 +02:00
dana
78fb8aaccf 44198: Add cd_silent option to suppress all cd output 2019-04-12 14:00:19 -05:00
Peter Stephenson
0d3a786b7c 43669: ensure explicit exit status is used over implicit 2018-10-10 11:17:58 +01:00
Peter Stephenson
bbccbe0c85 43660: extend 43653 when final exit is implicit.
Combine logic for case after committed to exit (shell_exiting) with
case where exit occurred in a function we nee to unwind (exit_pending).

Add sarky note for future generations to be confused at.
2018-10-09 14:38:26 +01:00
Peter Stephenson
9ede8c657f 43656: special tied arrays don't have tieddata 2018-10-09 11:21:47 +01:00
Peter Stephenson
d768a7492a 43653: explicit exit from EXIT trap overrides exit status 2018-10-09 10:05:05 +01:00
Peter Stephenson
f99f7dca75 43616: Various parameter setting and display fixes.
Mostly to do with typeset -p and tied variables and their interaction.

Some general tied variable fixes.
2018-10-08 10:10:42 +01:00
Jörg Thalheim
03a51a6f09 GitHub : Add missing math.h include for builtins
math.h is required for isnan/isinf
2018-09-10 13:05:46 +00:00