1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-17 02:51:01 +02:00
Commit graph

439 commits

Author SHA1 Message Date
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
Mikael Magnusson
e2fe81ae9a 33785: Fix leaks of desthost in ztcp
Found by coverity.
2014-11-24 08:16:48 +01:00
Oliver Kiddle
a526a2203b 33743: use posix_openpt in zpty if it is available 2014-11-24 00:05:59 +01:00
Mikael Magnusson
a9004ce32f 33607: Fix some minor problems in zattr module
Remove the listattr call in zgetattr, it only caused no error to be output
when trying to retrieve an xattr from a file with no xattrs. When a file
had xattrs, it would just add an extra syscall for no good reason.

Always set an array parameter in zlistattr, this makes the returned value
much easier to use; in fact the _zattr completer didn't account for this
and zlistattr foo <tab> on a file with only one attribute did not work.

Almost all of the patch is only reindent, the only modification that's
not a pure deletions is:
 -        ret = 1 + (attr_len > val_len || attr_len < 0);
 +        ret = 1 + ((val_len > 0 && attr_len > val_len) || attr_len < 0);
which makes sure we return the correct error in the new path due to the
removed listattr call. (If val_len is -1 due to no attribute existing,
it doesn't mean the user should retry the call because the attribute
grew in size).
2014-11-07 11:10:30 +01:00
Peter Stephenson
ef4fb421f5 33582: don't include tcp.mdh in zftp.c.
It's a private module definition header that doesn't need
to be exposed.
2014-10-31 10:23:29 +00:00
Jun T
d36421d376 33566: quash null pointer constant compiler warning 2014-10-29 08:48:17 -07:00
Peter Stephenson
0557c226fc 33294: $functions[func_with_redir] plus extra tests 2014-09-30 12:58:52 +01:00
Peter Stephenson
08e5191ff0 users/19097: remove $functypetrace in favour of ref to $zsheval_context 2014-09-18 19:09:52 +01:00
Peter Stephenson
246404a44d Add $functypestack special parameter in zsh/parameter 2014-09-12 20:35:16 +01:00
Barton E. Schaefer
956829c18e 33122: typo from 32891 caused incorrect matches for pcre_match -n 2014-09-07 10:48:32 -07:00
Peter Stephenson
cc6e9db29d 33047: use git to simplify massively source distribution file selection 2014-08-23 21:01:58 +01:00
Peter Stephenson
51c0ccd303 missed updates to calls to ztrftime() 2014-07-30 14:20:07 +01:00
Barton E. Schaefer
f6429189a8 32903: new empty (unset) elements in the special parameter hash tables are special themselves 2014-07-24 08:16:29 -07:00
Barton E. Schaefer
933a0c45d2 32898 (credit Jun T.): fix offset_start initialization bug in 32891 2014-07-23 08:40:11 -07:00
Barton E. Schaefer
2693d852f6 32891: CASE_MATCH for =~ when using pcre; fix pcre_match with empty string 2014-07-20 11:42:09 -07:00
Barton E. Schaefer
38be9fe84a 32468: save/restore match/mbegin/mend when doing pattern lookups against zstyle contexts 2014-03-09 00:29:02 -08:00
Barton E. Schaefer
956d35ef12 32388: zparseopts -K preserves individual associative array elements 2014-02-15 13:49:26 -08:00
Jun T
feae6af6d2 32131: avoid infinite loop reading pty on platforms that do not buffer output after child exit 2013-12-16 22:15:08 -08:00
Peter Stephenson
4163ebf4c7 unposted, see 32054: Rationalise character encoding.
Shell functions are strictly ASCII for maximum portability.

Other files within the distribution may contain UTF-8 characters.

Exception for test files: where they need single character input
with the top bit set, ISO-8859-X is used (X doesn't matter as
we don't need the Euro).
2013-11-27 15:56:44 +00:00
Jun T
ef4d20ad6f 31902: rationalise use of gamma function.
Make zsh/mathfunc consistent across systems and use tgamma() where
available
2013-10-27 00:00:56 +01:00
Mikael Magnusson
fa03332635 31805: Add $patchars and $dis_patchars to zsh/parameter module 2013-10-11 14:57:57 +02:00
Peter Stephenson
b0a0441902 31672: Add test that was failing and fix zpty set-up race 2013-08-26 21:01:17 +01:00
Peter Stephenson
f75904a380 31665: zpty should attach terminal on slave.
Also add test.
2013-08-25 20:48:52 +01:00
Peter Stephenson
a4d3b8f676 31419: Add time zone and year to string formatted time output from zstat 2013-05-21 17:42:57 +01: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
4e2cdd7956 30722: fix some cases where emulations or options were not propagated properly
from the emulate command
2012-10-07 19:46:46 +00:00
Phil Pennock
52ef609f69 30513: zsh/regex metafy fixes for widechar 2012-06-16 01:21:02 +00:00
Peter Stephenson
86f8e8de69 30307 plus tweak suggsted by Wayne: use %lld for zlong when long long 2012-03-05 10:06:28 +00:00
Peter Stephenson
2d47270112 unposted: fix uninitialised variable warning in pcre 2012-01-06 10:08:53 +00:00
Peter Stephenson
cf4e27a129 29907: Jun T.: remove declaration of unused variable 2011-11-17 12:27:18 +00:00
Peter Stephenson
fdb00982f5 Jun T: 29883: cast resource types to types they should be anyway 2011-10-31 09:48:58 +00:00
Peter Stephenson
68d1c094db 29865: don't compile pcre if no pcre-config 2011-10-26 16:46:09 +00:00
Phil Pennock
2f3c16d40f 29838: metafy/unmetafy strings for PCRE matching (UTF-8 fixes) 2011-10-24 11:31:25 +00:00
Peter Stephenson
3ba487ca77 unposted: use pm->node.nam to get names for parameters in errors 2011-08-15 19:32:30 +00:00
Peter Stephenson
515554acbc fix datetime autofeatures 2011-08-11 19:43:46 +00:00
Peter Stephenson
8cbd510002 29674: add $epochtime to datetime 2011-08-11 18:45:04 +00:00
Peter Stephenson
bbbaed2b53 29663: add $EPOCHREALTIME to zsh/datetime 2011-08-10 11:31:18 +00:00
Peter Stephenson
962624e8c3 29491: remove some variables set but not used 2011-06-19 16:26:10 +00:00
Bart Schaefer
8a6222a372 29382: apply 29374 to zccmd_input too. 2011-05-27 13:54:07 +00:00
Bart Schaefer
86b900ad97 29312, users/16032: add "zparseopts -M" 2011-05-18 00:23:00 +00:00
Peter Stephenson
9c0a19669b Danek: 29254: fix some compiler warnings 2011-05-13 18:12:05 +00:00
Peter Stephenson
d89361739a 29165: use term.h globally if needed at all. 2011-05-09 09:49:08 +00:00
Bart Schaefer
70fd751a82 users/15986: handle EINTR in zccmd_input 2011-05-08 23:19:11 +00:00
Peter Stephenson
94225e07fc 28638: add $usergroups parameter 2011-01-19 12:42:53 +00:00
Peter Stephenson
0a5702457b 28510: add (z+c+) and (z+C+) parameter flags 2010-12-12 22:44:50 +00:00
Peter Stephenson
fdebbca754 27990: don't use return value from setupterm()
to decide if module booted OK
2010-06-02 13:13:43 +00:00
Peter Stephenson
9ecfa0842b unposted: fix typo in previous commit 2010-05-12 10:17:58 +00:00
Peter Stephenson
09960dc5b9 27951: Add $ZSH_EVAL_CONTEXT and $zsh_eval_contxt 2010-05-12 10:06:59 +00:00
Peter Stephenson
31123a1184 users/14902: another go at strftime 2010-02-26 17:07:18 +00:00
Peter Stephenson
d5a0f7623c users/14900: ULONG_MAX is a valid return value from strotoul() 2010-02-26 15:30:37 +00:00