Peter Stephenson
d309d9addc
38692: IFS can't be changed in restricted mode
2016-06-21 12:32:27 +01:00
Barton E. Schaefer
3a6a6fda8a
unposted (cf. 38612): remove overeager DPUTS()
2016-06-04 22:21:29 -07:00
Greg Klanderman
440c6beec0
38086: shuffle init code to localize a global, add $ZSH_ARGZERO, refine $ZSH_SCRIPT
...
(also a couple of ChangeLog typos corrected -- Bart)
2016-03-06 09:53:40 -08:00
Stephane Chazelas
f7d5ff31ce
38020: fix problems with $SECONDS.
...
Fractions of a second were not handled correctly.
2016-02-26 11:12:32 +00:00
Barton E. Schaefer
b7b3ae311d
37988: $0 becomes read-only under POSIXARGZERO
2016-02-17 20:04:25 -08:00
Peter Stephenson
1ab316c9b8
37895: $ZSH_SCRIPT is POSIX $0 but always availble
2016-02-07 21:01:08 +00:00
Jun-ichi Takimoto
a4020e10a3
37868: add 'static' to file local variables
2016-02-03 01:25:33 +09:00
Barton E. Schaefer
10c5f95f52
37785: skip autoload parameters for "typeset -p"
2016-01-26 18:17:24 -08:00
Peter Stephenson
da71967273
37512: overeager WARN_CREATE_GLOBAL with strftime
2016-01-15 12:16:40 +00:00
Peter Stephenson
524f802610
37489, tweaked: with POSIX_IDENTIFIERS create math var as scalar
2016-01-03 18:57:10 +00:00
Peter Stephenson
16684952fb
37305: typeset -p can now output arrays on one line
2015-12-04 15:39:53 +00:00
Peter Stephenson
e40a14c5e4
37202: suppress WARN_CREATE_GLOBAL warnings after a fork
2015-12-04 10:44:33 +00:00
Daniel Shahaf
5ecf332e84
37253: Constify two local variables.
2015-12-03 23:53:03 +00:00
Daniel Shahaf
4202c90b6d
37254: No functional change: change code layout in preparation for 37253.
2015-11-30 03:42:46 +00:00
Daniel Shahaf
503fa5cd9e
37250: No functional change: rename local variables.
2015-11-30 03:42:45 +00:00
Barton E. Schaefer
9e06828a7f
37208: check for restricted parameter before changing from unset to set
...
Also, return NULL from setnparam() on failure to retrieve value (avoids
null-pointer dereference); add some expository comments
2015-11-23 21:48:49 -08:00
Peter Stephenson
58d040fd85
37203: WARN_CREATE_GLOBAL test in wrong place for associative array
2015-11-23 15:50:13 +00:00
Peter Stephenson
2737ae4a66
37168: No WARN_CREATE_GLOBAL on special parameters
2015-11-20 11:55:07 +00:00
Barton E. Schaefer
30b90f166e
37080: use paramtab abstraction more consistently, add explanatory comments
2015-11-08 12:44:31 -08:00
Daniel Shahaf
51d50218fb
unposted (after 37018): Fix typo in error message.
2015-10-30 15:03:12 +00:00
Peter Stephenson
de9effbce6
37018: Make WARNCREATEGLOBAL more consistent.
...
Wd don't need separate math handling any more, and can make it
output the function name in all cases.
2015-10-29 17:06:27 +00:00
Peter Stephenson
0628802baf
37014: Improved internal parameter setting.
...
Enhance WARNCREATEGLOBAL to work in many more cases.
Don't create REPLY as an integer if it didn't previously exist
as one, even if the value to be set is integral, as this is likely to
mess up later uses of REPLY.
2015-10-29 15:01:07 +00:00
Peter Stephenson
83a175795a
36780: Fix crash in ksh mode with -n and $HOME.
...
If home variable is NULL ensure HOME is unset.
2015-10-06 09:28:07 +01:00
Mikael Magnusson
8e3ca08f13
36347: Fix appending empty array to associations
2015-09-01 23:20:05 +02:00
Barton E. Schaefer
a1f8d4ffc7
35826: add getsparam_u() to return unmetafied string, use it for a number of references to non-special params
2015-07-22 12:52:24 -07:00
Barton E. Schaefer
f3e8f4cf7a
35581, 35582: output array assignments with spaces inside the parens
2015-07-22 12:43:09 -07:00
Barton E. Schaefer
a0862f6381
35799: with NO_EXEC, parse parameter subscript expressions
2015-07-15 17:51:41 -07:00
Mikael Magnusson
e55c167083
35476: Allow setting $0 when POSIX_ARGZERO is not set
2015-06-17 02:26:17 +02:00
Barton E. Schaefer
af957f2ed6
35231: make mkevnstr() safe for NULL value
2015-05-20 10:14:04 -07:00
Peter Stephenson
f855801fb9
35059: fix, document, test readonly -p.
...
Don't output specials as can't be reconstructed.
Output arrays in a useful order.
2015-05-08 12:53:18 +01:00
Peter Stephenson
60c6bcdeae
35054: readonly -p + POSIXBUILTINS fix.
...
Now displays unset variables marekd readonly
2015-05-07 12:10:16 +01:00
Peter Stephenson
bf258a1c07
34992: POSIX fix for readonly variables.
...
With POSIXBUILTINS, variables can be marked readonly if unset.
Also, variables can't have the readonly flag removed.
2015-04-29 15:54:49 +01:00
Peter Stephenson
bc8491c3dc
34430: parameter fixes for gdbm tied hash.
...
Probably fix the issue with correct parameter hiding or not hiding.
A little extra safety checking.
Possibly fixed a memory leak with untying.
2015-01-29 21:05:17 +00:00
Peter Stephenson
c6c9f5daf2
34322: bug with interface to parsestr() etc.
...
Was showing up in places like ${(e)...} where command substitution
could reallocate the token string, but actually there was never any
guarantee that the lexer wouldn't do that, so this was always
a bit iffy.
2015-01-18 22:38:57 +00:00
Peter Stephenson
89012cf94c
34015: disallow strange environment variable names.
...
These are ones with the top bit set in any character.
Don't import them, and don't export them.
2014-12-19 22:15:24 +00:00
Peter Stephenson
ecef922df1
34008: metafy the environment on arrival in the shell
2014-12-18 19:55:53 +00:00
Peter Stephenson
f3cb9a7754
34006: unmetafy anything put into the environment
2014-12-18 19:36:03 +00:00
Peter Stephenson
d067ebcacd
33876: etc.: Separate errors and keyboards interrupts
...
Combination of 12 commits from interrupt_abort branch.
Basic strategy is to introduce bits to errflag and to set and
reset them separately.
Remove interrupt status on return to main keymap.
Turn off ERRFLAG_INT for always block.
Restore bit thereafter: we probably need a new variable in order
to allow user interrupts to be reset in the always block.
Add TRY_BLOCK_INTERRUPT
This works the same as TRY_BLOCK_ERROR, but for a SIGINT, too.
Ensure propagation of SIGINT from exited job.
If received by foreground job, shell uses ERRFLAG_INT, not
ERRFLAG_ERROR, to set the new state.
Reset errflag before precmd()
Add always block in _main_completion to fix ZLS_COLORS
Ensures we get the right state of $ZLS_COLORS at the end of _main_complete
even if there's an interrupt. However, the "right state" is a bit messy
as it depends on styles.
2014-12-11 09:41:17 +00:00
Peter Stephenson
546203a770
33276: safer import of numerical variables from environment
2014-09-29 17:15:56 +01:00
Barton E. Schaefer
19f3161e51
32634: add POSIX_ARGZERO option
2014-06-01 15:01:37 -07:00
Peter Stephenson
1cc3424cbe
unposted: use DIGBUFSIZE for pipestatus numeric buffer
2014-05-29 20:17:30 +01:00
Barton E. Schaefer
f3e7cfe47c
32337: change initialization of some special parameters for emulation compatibility
2014-02-02 13:16:16 -08:00
Peter Stephenson
22b8fd6da9
32299: add use of underscores on arithmetic output for spacing
2014-01-23 10:32:59 +00:00
Barton E. Schaefer
120145561f
32208: always reset pathchecked when the path array is modified
2013-12-30 23:31:35 -08:00
Barton E. Schaefer
9cacf4411f
32157: fix extra line feed after prompt, and erased character in completion listing, when ZLE_RPROMPT_INDENT=0
2013-12-18 23:45:20 -08:00
Barton E. Schaefer
ae92cadc75
31772: queue_signals() to prevent re-entry into endparamscope().
2013-09-26 21:27:27 -07:00
Bart Schaefer
9af1cd4722
30530,30533: fix problems with COLUMNS or LINES < 1, and related issues
2012-06-27 07:10:29 +00:00
Peter Stephenson
c335b7f0a1
30455: remove max array length test
2012-04-25 09:31:57 +00:00
Peter Stephenson
5eb53bf88d
30431 with typo in _typeset fix:
...
add ${...:|...} and ${...:*...} operators, as documented
2012-04-22 18:10:42 +00:00
Peter Stephenson
653abd34a9
30391: tweak to ignore DISABLED flag in new hash-based arrayuniq()
2012-04-13 16:01:20 +00:00
Bart Schaefer
4a4d9f3cbe
30383, users/16991 (Vaclav), users/17000: Improve speed of arrayuniq() by
...
implementing a hash seive algorithm; add test to exercise it.
2012-04-10 01:17:02 +00:00
Peter Stephenson
a76c8de44c
30351 + 30352: metafy strings on import into zsh variables
2012-03-13 09:47:01 +00:00
Peter Stephenson
9934781a97
30098: Jun T.: alternative to 30079: don't setlocale() in setlang() if LC_ALL set
2012-01-07 23:21:00 +00:00
Frank Terbeck
1a330ad751
30079: Src/params.c: Restore LC_ALL' when setting
LANG'.
2012-01-04 22:35:55 +00:00
Peter Stephenson
548c4562fe
fix tests using zsh/datetime that I broke
2011-08-11 19:32:50 +00:00
Peter Stephenson
7d1480af54
29626: arguments to anonymous functions shouldn't be parsed as command words
2011-07-28 09:20:02 +00:00
Peter Stephenson
962624e8c3
29491: remove some variables set but not used
2011-06-19 16:26:10 +00:00
Mikael Magnusson
72cb7cfc6f
29307, 29308 + replies: Fix some doubled words in docs and comments.
2011-05-19 16:10:46 +00:00
Peter Stephenson
c59e19cd77
29191 (Danek) and 29203 (with fixes): make TERMINFO variable special.
2011-05-10 15:40:32 +00:00
Peter Stephenson
d89361739a
29165: use term.h globally if needed at all.
2011-05-09 09:49:08 +00:00
Peter Stephenson
4f9ee790e0
28630: Ricky Zhou: fix crash with isident()
...
28634: add test
2011-01-16 20:35:29 +00:00
Peter Stephenson
ef4055d97c
unposted: fix return types in 28617
2011-01-11 20:42:40 +00:00
Peter Stephenson
dfc26195c9
28617: NO_EXEC option was doing too much work in
...
parameter subscripting, parameter assignment, and globbing
2011-01-10 18:24:17 +00:00
Bart Schaefer
bc1a12f91e
users/15662: array slice assignment with one index positive and one negative.
2010-12-21 16:54:30 +00:00
Peter Stephenson
23bdfc7fd2
28418: add ${NAME:OFFSET:LENGTH} substitution
2010-11-18 10:07:55 +00:00
Bart Schaefer
ad56692b16
28384: improve error message on assignment to a field of a read-only hash.
...
CVS ----------------------------------------------------------------------
2010-11-03 22:40:33 +00:00
Peter Stephenson
af5a85f363
28339: backslash-newline history without HIST_LEX_WORDS
...
28340: assignment to range of scalar variable with multibyte characters
2010-10-10 17:51:29 +00:00
Peter Stephenson
8bc64084a4
28220 plus some comments: fix "HELLO=$HELLO shellfunc"
2010-08-31 19:32:56 +00:00
Peter Stephenson
099dc207fa
27994: better error for failed parameter autoload
2010-06-03 13:38:17 +00:00
Peter Stephenson
09960dc5b9
27951: Add $ZSH_EVAL_CONTEXT and $zsh_eval_contxt
2010-05-12 10:06:59 +00:00
Peter Stephenson
9fe0077305
Geoff: 27693: rename underscore to avoid name clash
2010-02-09 13:58:11 +00:00
Peter Stephenson
036cb0ce95
Joakim Rosqvist: 27591 as modified in 27594:
...
KEYBOARD_HACK variable
2010-01-13 12:05:22 +00:00
Peter Stephenson
1acf23db3e
27243: reverse indexing of arrays with beginning index out of range returned
...
wrong value
2009-09-05 19:49:19 +00:00
Peter Stephenson
ff0b4ebdd5
26950: warn on failed attempt to change user or group ID
...
26593: print warning but dont fail test if simple Unicode conversion fails
2009-05-08 14:30:31 +00:00
Peter Stephenson
c7d8b0dfb8
26546, 26556: sticky emulation for functions defined in emulate ... -c ...
...
environments, plus documentation
2009-02-11 20:42:15 +00:00
Peter Stephenson
fe3fb64472
26315: define ZSH_PATCHLEVEL to "unknown" if not found
2009-01-15 19:47:20 +00:00
Peter Stephenson
45bee14fec
26313: --enable-custom-patchlevel
...
unposted: WARN_CREATE_GLOBAL in tcp_log
2009-01-15 14:49:50 +00:00
Peter Stephenson
18143c3226
262727: add $ZSH_PATCHLEVEL from ChangeLog revision
2009-01-09 20:28:30 +00:00
Peter Stephenson
d69bd194b9
26260: fix crash failing to assigns scalar to special hash
2009-01-08 13:12:06 +00:00
Clint Adams
365e04460d
25926: free val only after it may be passed to strlen (as in 25656).
2008-10-23 00:48:59 +00:00
Peter Stephenson
ad3e2aa215
25831: fix empty return values from subscript matches with RC_EXPAND_PARAM
2008-10-09 13:46:45 +00:00
Peter Stephenson
29db898a6d
25774: fix in 25772 was applied too widely
2008-09-29 20:56:23 +00:00
Peter Stephenson
7be4f882fe
25772: crash with bad associative array pattern search
2008-09-29 17:39:38 +00:00
Clint Adams
6b68cc95c7
25656: free val only after it may be passed to strlen().
2008-09-13 08:19:17 +00:00
Peter Stephenson
db31a13ecd
25627: add $ZSH_SUBSHELL
2008-09-05 21:02:08 +00:00
Peter Stephenson
dc72699b6c
25364: fix k flag in hash subscript
2008-07-31 13:53:28 +00:00
Peter Stephenson
56e1904e45
fix optimisation of string matching with multibyte mode
...
24732: attempt to provide adequate space for sched ztrftime string with
multibyte characters
2008-03-25 17:47:10 +00:00
Bart Schaefer
4625e0eabc
24717, 24718, 24719: a 0 subscript is neither valid nor equivalent to 1
...
any longer, so the (i) subscript flag on an empty array needs to yield 1.
2008-03-18 15:14:20 +00:00
Peter Stephenson
ed5c4c8e53
24384 plus extra check: care with scanprog
2008-01-10 10:25:31 +00:00
Wayne Davison
3a6b74f4b0
Silenced a signed/unsigned compiler warning.
2007-12-27 16:00:53 +00:00
Peter Stephenson
2d03aa87fb
24264: restrict effect of 24234 to parameter substitution code and document
2007-12-16 14:05:14 +00:00
Peter Stephenson
5d5d1bef6e
24234: apply typeset parameter flags consistently
2007-12-13 20:52:52 +00:00
Bart Schaefer
1b363034ce
24113: createparamtable() was still messing with
...
the internals of the environment even when USE_SET_UNSET_ENV.
2007-11-23 02:32:56 +00:00
Oliver Kiddle
4ac2515ed8
24045: fix memory leak where old value of an environment variable isn't freed
2007-10-31 21:03:21 +00:00
Peter Stephenson
595dd31b63
23730: improve preprocessor and regression tests for 23725
2007-07-31 11:26:54 +00:00
Peter Stephenson
1ab7d0fd0b
23725: use setenv()/unsetenv() for environment memory management
2007-07-30 20:46:04 +00:00
Peter Stephenson
4fab17e62a
23696: x=x; x[-10]=y did bad things
2007-07-25 09:26:51 +00:00
Peter Stephenson
1b52f47cf2
23665: autoloading of module features and related tweaks
2007-07-06 21:52:38 +00:00
Peter Stephenson
abae4fe16e
23562: add KSH_ZERO_SUBSCRIPT option and leave off by default
2007-06-18 13:25:03 +00:00
Peter Stephenson
709aee90ce
23553: unsubscripted array inside math eval behaves more rationally
2007-06-12 15:43:16 +00:00
Peter Stephenson
29b7123647
23485: feature completion and autoloading
2007-05-29 14:16:02 +00:00
Peter Stephenson
b0c5f09169
see 23479: add initial features support for modules
2007-05-28 22:57:39 +00:00
Peter Stephenson
faf05be3d2
23440: Make $param[(R)value] substitute the empty string on failure
2007-05-21 09:30:24 +00:00
Peter Stephenson
3be3ca8805
23437: typo noted by Wayne
2007-05-14 09:25:30 +00:00
Peter Stephenson
599a7fd7a7
23436: consistency with null strings in local variables
...
unposted: Phil Pennock: POSIX RE's are extended
2007-05-13 20:18:28 +00:00
Peter Stephenson
05ff4fb3ab
23273: fix bad patterns in reverse array subscripting
2007-04-13 11:54:16 +00:00
Peter Stephenson
62b671f0d1
23159 plus minor doc tweaks: leave BAUD parameter unset by default
2007-02-08 10:43:28 +00:00
Peter Stephenson
0108088f52
23152: make ztrcmp() respect MULTIBYTE
...
make sorting of printed hash tables more consistent
2007-02-06 21:47:54 +00:00
Peter Stephenson
d8207acddb
22952: fix some argument delimiters to work with multibyte characters
2006-11-02 18:43:19 +00:00
Peter Stephenson
b262d310b2
22686: unset array if assigning numeric parameter
2006-09-11 11:09:15 +00:00
Peter Stephenson
80acfd135c
22684: improve getkeystring() interface and make printf do octal escapes
2006-09-10 18:10:48 +00:00
Peter Stephenson
6d61a3859e
22578: ensure HISTCHARS/histchars never contains non-ASCII characters
2006-08-02 17:16:37 +00:00
Peter Stephenson
4a67f24798
22544: Improve use of ztype tests for multibyte characters. Add
...
POSIX_IDENTIFIERS option to control allowability of multibyte
alphanumeric characters in parameter and module names.
2006-07-10 13:08:22 +00:00
Peter Stephenson
f95a6a913c
22524: searchable parameter subscripts with multibyte chars,
...
a few other fixes
2006-06-27 16:28:45 +00:00
Peter Stephenson
05bd0b2dd1
22518: Initial go at making parameter subscripts
...
use multibyte characters.
2006-06-26 18:17:31 +00:00
Peter Stephenson
8346a5e8d2
22483: add $sysparams to zsh/system
2006-06-05 13:21:56 +00:00
Peter Stephenson
dd5602f59b
22474: use variable argument lists to improve error message handling
2006-05-30 22:35:03 +00:00
Wayne Davison
4cb83571c4
Changed some structures to avoid gcc's type-punned warnings.
2006-03-07 21:30:36 +00:00
Bart Schaefer
20aae107b8
22321: optimize 22318.
2006-03-06 15:38:59 +00:00
Clint Adams
a915138852
22284: add --disable-dynamic-nss configure switch to disable use of getpw*(), getgr*(), initgroups() functions.
2006-02-19 19:36:31 +00:00
Peter Stephenson
30176eaf63
22198: do always set HOME in native emulation
2006-02-07 11:29:30 +00:00
Peter Stephenson
8b0cc87817
22195: don't set HOME in the shell
2006-02-06 11:57:03 +00:00
Peter Stephenson
e366ca8dbf
users/9638: tweaks for FCEDIT etc.
...
21986: rewrite completion suffixes for wide characters
2005-11-07 09:37:34 +00:00
Peter Stephenson
337b9dba1f
21974: memory leak with tied parameters
2005-11-02 12:04:46 +00:00
Peter Stephenson
3c37057c34
21871: replace INULL() by inull()
2005-10-13 16:30:13 +00:00
Peter Stephenson
409296e22f
21736: improve tests for word and identifier characters with multibyte input
2005-09-20 15:10:26 +00:00
Peter Stephenson
7746eea52b
adapted from 21719: add some mod_exports
2005-09-09 16:06:47 +00:00
Peter Stephenson
f2d873d811
21701: Negative subscripts of scalars before start were broken
2005-09-06 15:28:17 +00:00
Peter Stephenson
635b405c55
21678: Unsetting tied parameters caused various crashes
2005-08-22 11:43:36 +00:00
Peter Stephenson
d307660dee
21575 plus unposted: Add WARN_CREATE_GLOBAL option
2005-08-08 16:48:52 +00:00
Wayne Davison
03531ff379
The parsing of \c in $foo[(pws:\c:)1] should treat \c as an unknown
...
escape (resulting in a literal "c"), not remove the sequence (from
a patch by Thorsten Dahlheimer).
2005-07-24 05:37:23 +00:00
Clint Adams
5571605340
* 21124: Src/Zle/zle_main.c, Src/init.c, Src/params.c: have zle cache a
...
wide-char version of WORDCHARS each time it's changed (when ZLE_UNICODE_SUPPORT
is defined).
2005-04-08 16:42:55 +00:00
Peter Stephenson
43d480057b
20959: fix crash unloading zsh/parameter and test the fix
2005-03-10 17:55:37 +00:00
Wayne Davison
e63e45ae62
Got rid of "unused parameter" compiler warning for nullsethashfn().
2005-01-21 11:15:36 +00:00
Peter Stephenson
88a37cc187
c.f. 20675: improve zle as a basis for Unicode.
...
unposted: update version to 4.2.3-dev-1
2005-01-14 13:04:47 +00:00
Peter Stephenson
69b4b8bdde
20605: Use separate structure with get/set/unset methods fro parameters.
...
Separate justification width of parameters from base/precision.
2004-12-07 16:54:58 +00:00
Peter Stephenson
ba32e52292
users/8219: add $HISTCMD
2004-11-16 19:05:50 +00:00
Wayne Davison
74fb5712a2
- Call saveandpophiststack() with its new writeflags arg.
2004-10-01 19:48:57 +00:00
Wayne Davison
b8b11e7627
Silence unused-parameter warnings from the compiler.
2004-10-01 19:06:49 +00:00
Peter Stephenson
7d3d6f4a5a
20391: SHLVL wasn't updated in environment
2004-09-20 14:35:19 +00:00
Peter Stephenson
037485c4a4
20378: Matthias B.: fix bugs joining with metafied chars.
2004-09-17 09:25:38 +00:00
Peter Stephenson
6b1dc0f701
20331: Use internal zlong variables for consistency
...
20332: Add WIDGETSTYLE zle parameter
2004-09-09 10:12:42 +00:00
Peter Stephenson
4c8796b11d
20141: Crash restoring exported special parameters
2004-07-07 15:00:44 +00:00
Peter Stephenson
d591334e9d
20076, 20084: { ... } always { ... } syntax.
2004-06-22 13:09:55 +00:00
Wayne Davison
fb0937a69e
Marked unused parameters with the new UNUSED() macro.
2004-06-02 22:14:25 +00:00
Wayne Davison
7c4ac8d60b
- Added missing struct initializers to two last-in-list values.
...
- Fixed a few signed/unsigned comparisons.
2004-05-28 19:20:01 +00:00
Wayne Davison
79a802c74c
Added a call to saveandpophiststack(0) to endparamscope() to enable
...
the new auto-pop feature.
2004-05-21 20:05:16 +00:00
Peter Stephenson
665b0950c6
19971: Fix environment nastiness in zexecve()
2004-05-21 11:19:30 +00:00
Oliver Kiddle
98e28ff3ed
19712, 19740: allow assigning to associations with i and r subscript flags
2004-04-06 13:00:50 +00:00
Oliver Kiddle
3023ddf132
19707: negative index into arrays should return scalar and not one element array
2004-03-30 16:35:30 +00:00