Peter Stephenson
fe3a63fa6c
39181: Add PM_SINGLE and use for compstate.
...
This flags that compstate (or any other special) can only have
a single instance and an attempt to create a new one is an error.
Given the very fiddly semantics of compstate any other usage
seems pointless.
No investigation yet of other variables that could use this.
Note it's still possible to hide such variables; only instances
that keep the special nature are affected.
2016-09-06 09:42:33 +01:00
Oliver Kiddle
e87aa8941f
38809: fix tracking of colour attributes and restore them when turning bold off
2016-07-08 22:28:15 +02:00
Daniel Shahaf
bced1beb8c
37700: Teach ${(z)} the 'repeat WORD SUBLIST' syntax.
2016-01-29 09:14:53 +00:00
Peter Stephenson
ad16356e19
37689: ! and ^ need to be tokenised in character sets
2016-01-19 17:24:12 +00:00
Peter Stephenson
8eb9070d67
37678: Now possible to quote "-" in pattern range
2016-01-19 09:55:46 +00:00
Peter Stephenson
f5b8efa7e0
37344: restore old printable quoting, add ${(q+)...}.
...
The \C- form is only used inside quotedzputs().
${(q+)...} outputs a quotedzputs() representation.
2015-12-07 21:49:07 +00:00
Peter Stephenson
5a76a5d34e
37314: upgrade quotedzputs() for non-printable output.
...
Use nicechar with $'..' quoting; upgrade nicechar() etc. to
use suitable output.
2015-12-06 15:33:02 +00:00
Peter Stephenson
830d54e629
37092: make nested ${(P)name} properly refer to parameter on return
2015-11-11 18:04:20 +00:00
Peter Stephenson
58f4cccb1f
37022: add GLOB_STAR_SHORT option to abbreviate ** and ***
2015-10-30 12:28:07 +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
1f6dcf9bcd
36941: Mark file descripors in ztcp as used.
...
Allow such file descriptors to be either internal and closed on exec
or external and so managed explicitly by module.
2015-10-24 20:24:35 +01:00
Peter Stephenson
d07783628e
36700: unmetafy early for parameter match
2015-09-29 19:47:21 +01:00
Peter Stephenson
f9d7651c25
36682: expand pattern interface to optimise unmetafication
2015-09-28 20:31:51 +01:00
Peter Stephenson
8b84419f45
36577: supplement 36559 to using LONG_MAX for 64-bit long
2015-09-21 14:42:22 +01:00
Peter Stephenson
6fa5f0612b
unposted: typo in 36559
2015-09-21 13:27:35 +01:00
Peter Stephenson
df0d86b847
36559: test earlier for overflow in pattern range
2015-09-19 23:08:46 +01:00
Peter Stephenson
e86b3cce47
36478: Add [[:INCOMPLETE:]] and [[:INVALID:]] pattern tests.
2015-09-10 20:05:48 +01:00
Peter Stephenson
9a82a86757
35793: avoid undefined behaviour shifting signed number
2015-07-23 09:31:12 +01:00
Peter Stephenson
2afdb3985a
35668: Improved fix for command/proc subst starting in alias.
...
Use input flag to suppress the unwanted backtracking.
Add test for the extra case covered.
2015-07-02 10:01:42 +01:00
Peter Stephenson
dce1f33c02
35667: fix command substitution that starts but doesn't finish in alias
2015-07-01 21:44:50 +01:00
Peter Stephenson
7708849b21
35655: APPEND_CREATE option for POSIX copmatible NO_CLOBBER
2015-06-29 19:01:31 +01:00
Peter Stephenson
420bfcfc66
35623: All is_array assignments should be treated as having a value.
2015-06-27 17:46:03 +01:00
Peter Stephenson
39b28980f3
various posts: Implement assignment parsing for typeset.
...
Typeset assignments now work like raw assignments except
for no "+=" and no GLOB_ASSIGN.
Documented in typeset builtin doc and mentioned in release notes.
Tests to ensure basic sanity.
Enabled by default, can be turned off by "disable -r" with typeset
family of commands.
2015-06-24 10:21:12 +01:00
Peter Stephenson
f1923bdfa6
Add non-metafied character length handling.
...
Use this in regex module and add test using $'\ua0'.
Rename mb_metacharinit() to mb_charinit() as it does not involve
metafied characters.
2015-06-12 09:30:39 +01:00
Peter Stephenson
2abba7243a
35386: expand tabs where useful in builtins outputing function.
...
Also add to zed -f.
Option is -x <numm>.
2015-06-05 11:21:22 +01:00
Peter Stephenson
d756f4eafd
35078: Add backslash quoting to parameter (b) flag from 35067.
2015-05-11 09:40:00 +01:00
Peter Stephenson
6269db883a
35067: Add (b) parameter flag for pattern char backslashing.
...
Doc tweak from Daniel in 35071.
Includes test.
2015-05-10 19:19:34 +01:00
Mikael Magnusson
bb2362e2c0
Don't treat NUL as a combining character
2015-05-10 01:59:08 +02:00
Peter Stephenson
3774bae034
34784: fix old bug with history word selection
2015-03-26 20:28:13 +00:00
Peter Stephenson
a22cb7cad2
34776: improve suppression of alias expansions from history.
...
Now uses the mechanism in use for other forms of suppression of
sections of input.
2015-03-25 18:00:25 +00:00
Peter Stephenson
52e938bac9
34570: Another nasty command / math substituion thing.
...
Mark arithmetic substitutions with tokens to make sure the substitution
go knows what to do. Before it was guessing by counting the
parentheses at the end.
2015-02-19 10:22:40 +00:00
Peter Stephenson
126fb61c7c
34560: Fix $(( that's actually a multiline cmd subst.
2015-02-16 17:16:57 +00:00
Peter Stephenson
968dd7387c
34234: use structures for normal and raw lexical buffer state
2015-01-11 19:12:58 +00:00
Peter Stephenson
cfd91eac07
Rearrange context saving.
...
Variables are now associated with the module that declares them, being
initialised and saved/restored there. However, as many variables are
used for communication between modules, many of them are set in multiple
places, so the assignment is ambiguous.
2015-01-09 21:33:39 +00:00
Peter Stephenson
c0d01a6fe0
Fix command substitutions to parse contents as they are read in.
...
Do this by refactoring misnamed lexsave()/lexrestore() to allow
continuity of history and input.
Add test.
2015-01-08 12:24:00 +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
65f56b5656
33655: remove overlap of node flags
2014-11-08 21:59:58 +00:00
Peter Stephenson
cf6b0f5663
33285: apply function definition redirections at execution
2014-09-29 21:02:59 +01:00
Peter Stephenson
546203a770
33276: safer import of numerical variables from environment
2014-09-29 17:15:56 +01:00
Peter Stephenson
b5198b10a1
32768 with further modifications: LOCAL_LOOPS option.
2014-06-13 21:39:44 +01:00
Peter Stephenson
7f6dc0fe8e
32682 with tweaks: Add INC_APPEND_HISTORY_TIME.
...
Revert INC_APPEND_HISTORY behaviour.
2014-06-06 21:56:47 +01:00
Barton E. Schaefer
19f3161e51
32634: add POSIX_ARGZERO option
2014-06-01 15:01:37 -07:00
Manuel Presnitz
973e5dc37d
32412 / 32415: New giga- and terabyte units for glob qualifiers
2014-03-01 19:08:17 +00:00
Peter Stephenson
db23c63005
32136: fix problem with kshglob.
...
Non-pattern characters that could be followed by "(" to introduce
a ksh glob but weren't caused failures.
2013-12-16 22:20:06 +00:00
Peter Stephenson
73ececfd01
31830: New feature for zshaddhistory hooks.
...
If the first non-zero return status is 2, save the line on the
internal history list, but don't write it out.
2013-10-17 10:14:25 +01:00
Peter Stephenson
5236425865
users:18023: Add PIPEFAIL option
2013-10-06 21:35:27 +01:00
Peter Stephenson
0b185e3dcd
users/17908: Keep history line in sync between ZLE and shell.
...
Update ZLE version if history is read, pushed or popped with ZLE active
2013-08-08 19:48:11 +01:00
Peter Stephenson
709dbbbda8
31549: Fix third problem with file descriptor management.
...
Replace ad-hoc subsh_close file descriptor for pipe management with the new
job-based addfilelist() mechanism.
2013-07-21 18:23:04 +01:00
Peter Stephenson
3c5732223f
31528: use job table to record file descriptors associated with process subst
2013-07-17 21:33:16 +01:00
Peter Stephenson
fdf2867e5f
31444: Basic code for enable/disable -p
2013-06-13 18:38:33 +01:00