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

3311 commits

Author SHA1 Message Date
Peter Stephenson
15490398d7 36944: extend fd management to zsocket 2015-10-24 20:48:47 +01: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
Barton E. Schaefer
b970ef6ef5 unposted: strdup should be ztrdup 2015-10-21 15:13:45 -07:00
Barton E. Schaefer
5cb75f0d41 36909: in getargs(), sanity-check the offsets for start and end of the requested words, in case of overflow 2015-10-21 15:13:17 -07:00
Barton E. Schaefer
827d360776 36853: replace pushheap/popheap by NEWHEAPS/OLDHEAPS in doshfunc() to optimize memory management
Includes re-indentation that was not done in the posted patch.
2015-10-14 21:46:26 -07:00
Barton E. Schaefer
643aca932a One crucial assignment accidentally lost from 36834 when merging 36836. 2015-10-11 21:48:10 -07:00
Barton E. Schaefer
d77bf2ba88 36836: zhalloc() avoids re-scanning all heaps when the last known heap with free space does not have enough space
This is the second of two performance optimizations for situations where
all heap arenas in the list are mostly full.
2015-10-11 21:16:58 -07:00
Barton E. Schaefer
9f8e3e82dd 36834: freeheap preserves last allocated heap
This is the first of two optimizations to improve heap performance when
there are a large number of mostly-filled heap arenas.
2015-10-11 21:11:10 -07: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
Barton E. Schaefer
3f96063335 36773: limit CORRECT / CORRECT_ALL to directory names in cases where it is obvious that a directory is expected 2015-10-04 14:01:08 -07:00
Barton E. Schaefer
cb26e11c70 unposted: back out 36707, add test case for 36766 2015-10-03 22:11:09 -07:00
Barton E. Schaefer
b581c3fece 36766: fix incorrect reset of noerrexit during "if" conditions 2015-10-03 19:40:14 -07:00
Peter Stephenson
faeb9555d3 36760: more care with already unmetafied pattern trial strings 2015-10-03 20:25:57 +01:00
Mikael Magnusson
0626be9e3c unposted: define zle_usable before using it (reported in 36741) 2015-10-02 20:41:53 +02:00
Mikael Magnusson
fa72e54712 unposted: zle_thingy: return a value in bin_zle_flags 2015-10-01 20:24:45 +02:00
Peter Stephenson
807a8338a3 36737: Ensure we don't dreference unterminated zero-length string 2015-10-01 16:21:18 +01:00
Barton E. Schaefer
bc2e73ba4c users/20672: missing "do" in gettext2() for "select" 2015-09-30 20:02:53 -07:00
Barton E. Schaefer
2bf4f667fb 36707: distinguish ERR_RETURN value of retflag so that execif() can ignore it in the test sublist 2015-09-30 20:01:13 -07:00
Mikael Magnusson
a855d7bd24 36709: zle -f from inside widget to set flags and make yank start/end zle params writable 2015-10-01 03:51:44 +02:00
Peter Stephenson
5336587307 36711: Allocate unmetafied pattern trial string on the heap 2015-09-30 10:19:16 +01:00
Barton E. Schaefer
a5a6c58ff8 unposted: fix typo in comment. 2015-09-29 13:36:43 -07: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
Barton E. Schaefer
4bed2cf256 36669: fix ${(z)...} of an an incomplete math expression by restoring "((" at the front of the token 2015-09-27 23:56:38 -07:00
Daniel Shahaf
2654cb43f6 36651: WARN_CREATE_GLOBAL += math expressions
Without this, '() { (( x=42 )) }' and '() { for (( i=0; … )) }' wouldn't warn
about $x and $i, respectively, being created global.
2015-09-27 23:52:25 +00:00
Barton E. Schaefer
7e4784f901 36663: replace obsolete "autobins" commentary with "autofeatures" 2015-09-27 12:43:25 -07:00
Barton E. Schaefer
c2254cfe2c 36661: replace obsolete "autobins" setting with "autofeatures" 2015-09-27 12:43:03 -07:00
Barton E. Schaefer
50721a1986 36641: fix multibyte handling in incremental search during menu selection 2015-09-26 13:46:20 -07:00
Daniel Shahaf
8165b488cb unposted: zle: Document the C helper function processcmd().
Also, tweak the docstring of zlelineasstring().
2015-09-25 23:38:41 +00:00
Mikael Magnusson
bd5806aa0a 36603: glob: fix dirfd leak during Y shortcut qualifier 2015-09-24 20:52:56 +02:00
Daniel Shahaf
1b5987cdb1 unposted: Followup to 36586: Change C99 comment syntax to the C89 syntax. 2015-09-23 21:41:13 +00:00
Han Pingtian
acf5bd766a 36586: fix completion match right anchor 2015-09-22 10:18:41 +01:00
Peter Stephenson
729f6ddfff 36580: don't copy empty buffer in compmatch.
Also check if length is non-zero when buffer is empty.
2015-09-21 20:33:58 +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
Barton E. Schaefer
e61717b606 36566: check for regular file before lseek() 2015-09-19 23:05:44 -07:00
Barton E. Schaefer
4375d7b905 36562: sanitize $PWD on import, per POSIX 2015-09-19 23:03:39 -07:00
Peter Stephenson
df0d86b847 36559: test earlier for overflow in pattern range 2015-09-19 23:08:46 +01:00
Barton E. Schaefer
07796811b0 cf. 36554: remove unnecessary pointer dereference 2015-09-19 09:34:05 -07:00
Barton E. Schaefer
18130bed7f 36552 plus test: fix Nularg string in quotestring(QT_DOLLARS) 2015-09-17 21:44:14 -07:00
Barton E. Schaefer
8a818381cf 36525: revert only the selfinsert() bit of 36496
selfinsert() may be called with incomplete wide character processing from
places other than getkeymapcmd()
2015-09-12 20:49:13 -07:00
Barton E. Schaefer
8e77fcb050 36522: unmetafy the argument of "zle -U" 2015-09-12 16:13:01 -07:00
Barton E. Schaefer
6ff0628182 36509: allocate hash table nodes with zshcalloc() to avoid garbage flag values 2015-09-12 09:53:39 -07:00
Jun-ichi Takimoto
8b1676e3b7 36491: Multibyte support for parameter expansion flags B,E,N 2015-09-12 20:35:56 +09:00
Daniel Shahaf
c76f4f96a6 36443: Set zle_highlight=(paste:standout) by default. 2015-09-11 21:49:39 +00:00
Daniel Shahaf
d37b59fe09 36443: Revert "35834: strip a final newline from pasted text: inserting is hard to tell apart from accepting it"
This reverts commit f17eb26a34.

Conflicts:
	ChangeLog
	Src/Zle/zle_misc.c
2015-09-11 21:49:16 +00:00
Peter Stephenson
e1c0a947cc Read full multibyte string early for self-insert 2015-09-11 21:40:45 +01:00
Sebastian Gniazdowski
89b55d4a5f 36489: fix curses bug with hash table for colours 2015-09-11 18:45:01 +01:00
Daniel Shahaf
c088906423 36445: Expose yankb, yanke, ZLE_YANK to widgets. 2015-09-10 19:14:34 +00:00
Peter Stephenson
e86b3cce47 36478: Add [[:INCOMPLETE:]] and [[:INVALID:]] pattern tests. 2015-09-10 20:05:48 +01:00
Barton E. Schaefer
3bca11c35c 36470: Auxiliary to 36468, return an empty buffer from zleread() if a widget exits 2015-09-10 09:10:08 -07:00
Peter Stephenson
86229fdf09 36468: Fix infinite loop exiting from Zle widget.
If the exit was while we were waiting to complete a lexical expression
we might not exit from the loop.
2015-09-10 16:02:27 +01:00
Oliver Kiddle
45e67c3552 36422: add missing unmeta() 2015-09-08 11:12:10 +02:00
Daniel Shahaf
8931e47b8d 36437: Document interaction of $region_highlight and $zle_highlight. 2015-09-07 21:17:40 +00:00
Mikael Magnusson
6e7ecb35a0 unposted: typo in comment 2015-09-06 12:35:14 +02:00
Peter Stephenson
938c4c1e4a 36421: fix breakage in pattern change in 36415 2015-09-04 13:40:28 +01:00
Peter Stephenson
f52795ea3e 36415: remap bytes from invalid multibyte characters.
These now go to 0xdc00 + index.  If wchar_t is a Unicode code point,
this is by construction an invalid character within the Unicode range.
If it isn't, we would hope the result was no worse than the current
fudge.
2015-09-04 10:07:51 +01:00
Peter Stephenson
32f5d3d8c1 36416: ^C in getzlequery() just aborts query.
Also logical but possibly invisible fix for error propagated
back from listing interface.
2015-09-03 17:52:40 +01:00
Daniel Shahaf
1ba2fac03d 36403: type -w += suffix alias
This makes 'type -w' distinguish suffix aliases from regular aliases,
like bare 'type' already does.

Use-case: detecting programmatically whether the command word is indeed
a valid command word (see <https://github.com/zsh-users/zsh-syntax-highlighting/issues/126>)
2015-09-03 09:17:39 +00:00
Barton E. Schaefer
9f5dffa1f3 36393: process queued signals during dotrap() 2015-09-02 19:11:54 -07:00
Peter Stephenson
cdbd1b2581 36378: skip directories when looking for files to autoload 2015-09-02 20:19:28 +01:00
Peter Stephenson
0e63286bd4 36399: Shell code text with multiple here documents wasn't shown properly. 2015-09-02 14:20:44 +01:00
Mikael Magnusson
8e3ca08f13 36347: Fix appending empty array to associations 2015-09-01 23:20:05 +02:00
Mikael Magnusson
cbe00216fe 36380: Avoid gcc case syntax 2015-09-01 23:18:17 +02:00
Barton E. Schaefer
3747f6b6ab 36376: handle signals during read1char() so it is possible to interrupt correct/correctall prompts 2015-09-01 11:26:06 -07:00
Peter Stephenson
21382e0b20 36365: magic-space could delete the reset of the line.
If we got a LEXERR, which didn't necessarily mean an actual error,
just something the rather nasty ctxtlex() got confused by, we
didn't scan the reset of the line.
2015-09-01 11:45:23 +01:00
Mikael Magnusson
9ca9a092de 36302: attr: Fix compilation with libcap 2.24 2015-08-28 05:12:29 +02:00
Barton E. Schaefer
85645fd683 36288: refine 36825, slightly different test for redirect context 2015-08-26 22:16:12 -07:00
Barton E. Schaefer
8186e9c94b 36285: update 36025, context cannot be command and redirect at the same time, redirect wins 2015-08-26 21:50:13 -07:00
Jun-ichi Takimoto
2e69ece5cf users/20455: do not use posix_openpt() on OpenBSD 2015-08-23 14:31:56 +09:00
Barton E. Schaefer
43079e5d8e 36274: clear virangeflag when getvirange() has an error (the next keystroke is not a motion/selection). 2015-08-22 21:54:31 -07:00
Barton E. Schaefer
1cfe4ca192 36273: teach endofline() and endoflinehist() about invicmdmode() cursor placement. 2015-08-22 21:50:31 -07:00
Barton E. Schaefer
8abe1496fb 36256: local options should remain in effect for "emulate -L" even if additional option settings are applied 2015-08-21 13:38:19 -07:00
Peter Stephenson
881474edcb unposted: fix up for 5.0.8-test-2 2015-08-21 21:33:37 +01:00
Peter Stephenson
f4c37a78b1 36265 plus FAQ: fix alias expansion after "function"
Owing to interesting historical parsing, names after the first
were treated as command words so had non-global aliases expanded.
Add an FAQ note that use of the function keyword works around
other alias problems
2015-08-21 16:55:10 +01:00
Peter Stephenson
c0df3440a4 36264: glob and pattern variable pathbuf is metafied.
Document this and unmetafy it when passing to system calls, including
lchdir() which is a system-level interface.
2015-08-21 15:17:18 +01:00
Peter Stephenson
61afb8dc8d 36262: Replace fix for missing unmeta in chdir().
It was needed in the argument to one of a pair of lchdir()s rather
than within zchdir().

Add tests for the case of a character with 0x83 within it.
2015-08-21 10:04:13 +01:00
Peter Stephenson
34be0f1fe5 36232: Unmeta needed in chdir() in zchdir() 2015-08-18 17:46:27 +01:00
Peter Stephenson
f8164fb647 36227: attempt to fix metafication problem with ztrftime.
fmt is treated as metafied on entry; use returned length to ensure
we metafy or output the correct length if there are embedded nulls.
2015-08-18 16:20:48 +01:00
Peter Stephenson
5292d60eb1 Revert "36222: unmetafy output from strftime"
This reverts commit 8141a3d850.
2015-08-18 14:27:42 +01:00
Peter Stephenson
8141a3d850 36222: unmetafy output from strftime 2015-08-18 12:36:51 +01:00
Peter Stephenson
770beb5816 36218: use unmetafied file name for mkdir system call 2015-08-18 11:10:54 +01:00
Daniel Shahaf
fa573a3579 36109: bracketed-paste: change quoting style 2015-08-17 21:53:16 +00:00
Barton E. Schaefer
5d019f426a 36180: avoid infinite job stop/continue loop on "wait PID" for a background job 2015-08-15 10:15:30 -07:00
Daniel Hahler
5f8a18a561 unposted: fix minor typos 2015-08-14 02:35:32 +02:00
Oliver Kiddle
832130c57d 36131: make use of undo limits; call mkundoent() when $UNDO_CHANGE_NO is referenced for a clear change number marking the current state 2015-08-13 16:18:26 +02:00
Kamil Dudka
51d2c66341 36106: fix const parameter to bindkey 2015-08-12 20:08:58 +01:00
Oliver Kiddle
4f509c6201 36125: don't set history context in get-line 2015-08-12 18:06:01 +02:00
Oliver Kiddle
f17eb26a34 35834: strip a final newline from pasted text: inserting is hard to tell apart from accepting it 2015-08-12 18:05:59 +02:00
Barton E. Schaefer
128bf385b1 36104: change order of child_block() and dont_queue_signals() to resolve yet another race condition 2015-08-11 08:55:23 -07:00
Barton E. Schaefer
a01f29c11d 36092: return the zpty master file descriptor in $REPLY for use with "zle -F" etc. 2015-08-11 08:55:23 -07:00
Barton E. Schaefer
1af2e6e02d 36090: keep signals queued for preprompt() 2015-08-11 08:55:23 -07:00
Oliver Kiddle
5ee4cc8c09 36096: special . mark in vi mode 2015-08-11 13:44:32 +02:00
Oliver Kiddle
3183cbd98c 36044: deactivate-region widget for escape in visual mode 2015-08-11 13:28:14 +02:00
Jun T
0f224e72cc 35952: bind escape in vi mode so it is a full key sequence and later keys aren't dropped 2015-08-11 13:22:45 +02:00
Barton E. Schaefer
45424e735d 36084: use zrealloc() consistently 2015-08-10 12:55:56 -07:00
Barton E. Schaefer
93ca77f8f7 36079: do not allow update_job() and its helpers to run the signal queue while we are processing a job exit. 2015-08-10 12:54:05 -07:00
Peter Stephenson
6fa8708bfc 36083: set array value when consistently retying scalar and array 2015-08-10 20:30:09 +01:00
Peter Stephenson
a07f74fadd Don't rely on implicit value when saving background process status 2015-08-10 16:59:55 +01:00
Peter Stephenson
cbdb3cf9be not quite posted: check for error return before EINTR 2015-08-10 13:44:12 +01:00
Joshua Krusell
9728f535e2 36039: Restart socket commands on EINTR 2015-08-10 12:32:33 +01:00
Barton E. Schaefer
df5f825538 36033: a few more queue_signals() to protect global state changes 2015-08-09 17:37:23 -07:00
Barton E. Schaefer
a88415cbf7 36026: zero freed pointers in zftp cleanup_() in case the module is re-loaded after unloading 2015-08-09 16:13:52 -07:00
Barton E. Schaefer
9958684574 36022 fix bug that some loop constructs could not be interrupted, revise signal queueing
There are two underlying ideas here:  (1) Keeping signals queued around
anything that's doing memory management (including push/pop of the heap)
has become crucial.  (2) Anytime the shell is going to run a command, be
it buitin or external, it must be both safe and necessary to process any
queued signals, so that the apparent order of signal arrival and command
execution is preserved.
2015-08-09 16:13:52 -07:00
Peter Stephenson
17d52d69ec Fix retying variables in opposite order.
Now gives an error.
Add test.
2015-08-09 19:10:01 +01:00
Peter Stephenson
249999cfb4 36025: Fix completion aftoer "foo=bar; setopt ".
Done by catching a case that doesn't seem to be handled otherwise,
so there's some hope it doesn't screw up too much.
2015-08-09 18:40:54 +01:00
Daniel Shahaf
1122d83a6e 36008: trap: Fix listing of traps created under non-alias non-canonical signal spelling 2015-08-08 21:43:49 +00:00
Jun-ichi Takimoto
b0ebabdc65 35929: protect FDT_PROC_SUBST by #ifdef 2015-08-09 00:06:57 +09:00
Jun-ichi Takimoto
d09dc4562a 35928: '%-m' should work even if not supported by strftime(3)
Also clarify document.
2015-08-08 03:39:51 +09:00
Daniel Shahaf
32669e77f4 unposted: Typo fix. 2015-08-04 10:41:25 +00:00
Oliver Kiddle
3d9a8073c2 35963: simplify condition found by coverity to include tautology 2015-07-31 15:01:30 +02:00
Barton E. Schaefer
c0a80171ee 35953: fix handling of command substitution in math context 2015-07-29 22:36:45 -07:00
Peter Stephenson
b3aa3b7791 35910: Don't add to raw lex buffer if lex stopped.
This was causing a segmentation violation in completion when parsing
an incomplete math expression, e.g. 'echo $((3*4)<TAB>'.
2015-07-25 21:50:55 +01:00
Peter Stephenson
dd8079e041 35809: fix $((...)) completion by _expand widget.
This changes internal quoting of the form still including tokens
not to add unnecessary internal backslashes.
2015-07-25 21:36:54 +01:00
Peter Stephenson
771381c2ce 35908: fix $((...)) completion in expand-or-complete widget 2015-07-25 20:22:23 +01:00
Barton E. Schaefer
84495e3415 35882: read-command has ZLE_NOTCOMMAND 2015-07-24 17:04:30 -07:00
Oliver Kiddle
0f02b27ab0 35864: add sysopen, sysseek and systell to system module 2015-07-24 12:36:35 +02:00
Peter Stephenson
8f8b82bc6c 35883: Don't attempt to back up over history if expanding alias 2015-07-24 10:19:00 +01:00
Peter Stephenson
bbd4cae6ad 35872: protect against NULL pointers in unmeta 2015-07-23 10:04:09 +01:00
Peter Stephenson
28a962f557 35849: close fd's from process substitution after fork
Leaving these hanging in parent could cause deadlock: test added.
2015-07-23 09:34:11 +01:00
Peter Stephenson
49ff2e00dc 35854: ensure history character unget doesn't recurse infinitely 2015-07-23 09:32:24 +01:00
Peter Stephenson
9a82a86757 35793: avoid undefined behaviour shifting signed number 2015-07-23 09:31:12 +01:00
Oliver Kiddle
b4aff3bc52 35824: allow highlighting of just pasted text and put text from bracketed paste in cut buffers 2015-07-23 05:36:27 +02:00
Oliver Kiddle
aee8aebd67 35814: POSTEDIT needs to be unmetafied 2015-07-23 05:22:46 +02:00
Joshua Krusell
855ceea901 35939: fix select polling in ztcp and zsocket 2015-07-22 13:06:56 -07: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
Oliver Kiddle
5911aca85f 35737: (tweaked c.f. Peter: 35759): use new undo limit for minibuffer and beep when limit is reached 2015-07-14 00:30:45 +02:00
Peter Stephenson
2833299312 35708: add UNDO_LIMIT_NO 2015-07-09 19:29:59 +01:00
Peter Stephenson
3af55c858f 35751: Fix ERR_RETURN and ERR_EXIT in "else" 2015-07-09 14:59:20 +01:00
Mikael Magnusson
e402747dd6 35745: ztrftime: Pass everything unhandled to the system strftime() 2015-07-09 15:32:55 +02:00
Peter Stephenson
04675eca4c unposted: remove compiler error in completion code 2015-07-07 12:48:30 +01:00
Barton E. Schaefer
a9add3de54 35694: fix handling of history modifiers applied across all elements of an array parameter value 2015-07-06 16:35:05 -07:00
Oliver Kiddle
68a5a5f453 35704: compadd -E 0 should imply -J and -2 2015-07-06 22:40:47 +02:00
Peter Stephenson
26d5d2eeac 35692: cfp_matcher_range used wrong raw character 2015-07-05 18:52:00 +01:00
Peter Stephenson
290354ff46 35688: Improved attempt to turn case wordcode into text. 2015-07-05 18:15:43 +01:00
Peter Stephenson
f2b2271fbe Turning case parsed as multiple alternatives back into text.
Also add test.
2015-07-04 11:01:47 +01:00
Oliver Kiddle
a257525afc 35681: fix day of month initialisation 2015-07-03 22:59:27 +02:00
Oliver Kiddle
acb05d1616 35674: make an undo event for initial buffer contents 2015-07-03 22:56:03 +02:00
Han Pingtian
38145b255a 35665: better handling for command line completion match handling 2015-07-02 16:28:14 +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
Oliver Kiddle
6e57de8ee2 35637: remove the now unused module hook for reverse-menu-complete 2015-06-29 01:59:43 +02:00
Oliver Kiddle
44c56f3af5 35627: make reverse-menu-complete start with the last match in
menu selection
2015-06-29 01:54:44 +02:00
Oliver Kiddle
fbc97e72e8 35623: fix menu-selection where initial selection
would not be displayed without scrolling
2015-06-29 01:46:39 +02:00
Peter Stephenson
93e5234532 35643: Redirections after typeset assignments were broken. 2015-06-28 17:47:02 +01:00
Barton E. Schaefer
811027a22a 35642: signal queueing in zcontext_save_partial() 2015-06-27 15:53:21 -07:00
Peter Stephenson
eb08892dcf 35635: a bit more consistency about making elements local 2015-06-27 21:19:26 +01:00