1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-19 03:31:14 +02:00
Commit graph

227 commits

Author SHA1 Message Date
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
Peter Stephenson
68d0d76db5 31441: use array to decide which forms of pattern are enabled 2013-06-01 20:39:09 +01:00
Peter Stephenson
3def943d04 users/17665: add FORCE_FLOAT option 2013-03-05 20:04:53 +00:00
Peter Stephenson
7c56d77184 30789: Add CONTINUE_ON_ERROR for old behaviour.
New behaviour is for scripts to exit on error instead of returning
to top level and executing the next command.
2012-11-15 21:08:15 +00:00
Peter Stephenson
4b86cc48f7 30726: make shell options passed to emulate stick along with the emulation 2012-10-11 20:14:01 +00:00
Peter Stephenson
eb562c9f2c 30715: use enum lextok for variables containing lexical tokens 2012-10-05 21:35:05 +00:00
Peter Stephenson
13b8a25456 Jun T.: 30640: MacOS doesn't define __STDC_ISO_10646__ but we need
the replacement wcwidth function anyway
2012-08-23 19:19:26 +00:00
Peter Stephenson
6f3ff6b653 30633: "functions -T" only traces marked function, not called functions 2012-08-21 18:03:01 +00:00
Peter Stephenson
97cf64a7ee Hiramatsu Yoshifumi: 30621 patch-ab (from NetBSD pkgsrc):compilation on
__INTERIX
2012-08-16 19:12:26 +00:00
Peter Stephenson
85a698b8ec YAMAMOTO Takashi: 30599: don't use replacement wcwidth if not ISO-10646 2012-08-07 18:29:02 +00:00
Peter Stephenson
53f893d062 30181, plus rename of PF_* flags to PREFORK_*:
Pass sh-wordsplitting instructions to paramsubst() using flags,
avoiding side effects of explicitly setting and unsetting the
SHWORDSPLIT option.
2012-02-12 20:27:48 +00:00
Peter Stephenson
c214b86e94 30101: add HASH_EXECUTABLES_ONLY option 2012-01-08 16:02:54 +00:00
Peter Stephenson
e3182c18de 29955++: IGNORE_CLOSE_BRACES option 2011-12-08 19:42:07 +00:00