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
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
Barton E. Schaefer
ef08028346 35634: handle failure of gettempname() in namedpipe() 2015-06-27 12:50:40 -07: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
77a0278bcc 35615: fix completion after tyepset 2015-06-26 17:56:44 +01:00
Peter Stephenson
42b9037ae5 35613: Handle array slices in typeset 2015-06-26 14:55:35 +01:00
Peter Stephenson
9265e49ccb typeset silent on repeated typeset x=() 2015-06-25 17:45:15 +01:00
Peter Stephenson
b16d754d9c 35604: create empty arrays in typeset with array=() 2015-06-25 17:01:48 +01:00
Jun-ichi Takimoto
0d7be4af0d 35550: fix backspace in interactive menu-select 2015-06-25 00:23:25 +09:00
Han Pingtian
77130df674 35514: [[:foo:]] tests in completion should be more specific 2015-06-24 14:56:32 +01:00
Peter Stephenson
7b46509e92 35590: tweak and test text output from typeset 2015-06-24 14:32:15 +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
2118390dc1 unposted: add missing (void) argument list to bracketedestring() 2015-06-23 11:28:47 +01:00
Peter Stephenson
7d588bc158 33566: regex module fix for unmatched parentheses 2015-06-22 17:35:38 +01:00
Oliver Kiddle
98687fa1de 35474, 35492: support the bracketed paste mode of newer terminal emulators 2015-06-19 00:15:38 +02:00
Oliver Kiddle
0a0ba5e664 35487, 35496: don't reinstate previous incremental search string
when search direction changes
2015-06-19 00:01:42 +02: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
2cfe892414 35493: erase $_ when the command line is an assignment 2015-06-16 17:03:39 -07:00
Barton E. Schaefer
19b37ef565 35482: be consistent about how argzero is allocated 2015-06-16 17:02:53 -07: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
40446a9827 35416: Turn on MULTIBYTE in all emulations.
This now includes sh.
2015-06-08 09:50:26 +01:00
Oliver Kiddle
ac26fafa03 35412: fix for - flag when formating strings with printf 2015-06-07 23:07:26 +02:00
Barton E. Schaefer
229bc3cc74 35350: extend "fc -I" to cover listing of "internal" history events only 2015-06-06 12:31:47 -07: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
Oliver Kiddle
4804a7c5ff 35360 (replacing 35357): fix for configuring zpty on FreeBSD without
pty.ko loaded
2015-06-03 23:54:09 +02:00
Mikael Magnusson
4dc4e23376 GLOB_ASSIGN should only affect scalar assignments 2015-06-02 16:09:35 +02:00
Peter Stephenson
099e717c15 35359: Improved math parsing and errors.
Check for bogus trailing ")" at end of top-level parse.

Extend some math error messages to indicate they are math errors.
2015-06-02 10:21:55 +01:00
Baptiste Daroussin
aab6bdc366 35357: FreeBSD needs HAVE_POSIX_OPENPT for zpty 2015-06-02 09:21:24 +01:00
Peter Stephenson
93e72ed1e9 35353: print -x and print -X expand tabs 2015-06-02 09:17:04 +01:00
Peter Stephenson
75cafccc0a 35343: Avoid $#name length handling for POSIX_IDENTIFIERS 2015-05-31 16:40:14 +01:00
Barton E. Schaefer
911edc5ea4 users/20238: add "fc -L" to operate only on the local shell history
Also avoid invoking the editor on empty results.
2015-05-30 15:22:09 -07:00
Peter Stephenson
e88610b786 35326: $#- was misparsed as ${#-} 2015-05-29 16:06:47 +01:00
Peter Stephenson
cba1d41ffc 2037: ${functions[foo]} shouldn't be unmetafied.
When passed back from the parameter-specific "get" handler it's
still in the shell's internals, so remains metafied.

This caused mayhem with UTF-8 characters in function bodies.
2015-05-29 12:17:18 +01:00
Peter Stephenson
2b08d0ed67 35318: POSIX_BUILTINS behaviour for getopts.
It needs to keep OPTIND, as well as the index within the
string pointed to by OPTIND, global in this case.
2015-05-28 18:32:39 +01:00
Peter Stephenson
cb596a55d9 35306: "test -z \(" failed due to parse confusion 2015-05-27 21:25:55 +01:00
Daniel Shahaf
9fcc105ff6 35127#1: Fix _describe/compdescribe problem with unsorted groups 2015-05-23 10:05:06 +00:00
Peter Stephenson
2f6a8a6c6c Tweak test for function level of exit.
Sometimes local level jumps so we need an inequality instead
of an equality.
2015-05-22 23:37:45 +01:00
Peter Stephenson
a95f2c6071 35250: Fix case documentation (SH_GLOB) 2015-05-21 10:43:32 +01:00
Peter Stephenson
afb78f5d14 35248: treat fully parenthised zsh patterns as complete case patterns again 2015-05-21 10:25:07 +01:00
Barton E. Schaefer
af957f2ed6 35231: make mkevnstr() safe for NULL value 2015-05-20 10:14:04 -07:00
Peter Stephenson
ff19094669 35193: Add "unalias -a". 2015-05-18 16:57:08 +01:00
Peter Stephenson
2d6569e590 35184: Additional case fix for 35168.
Lexical analysis flags got screwed up after a "|", so we
didn't parse patterns properly, in particular those with parentheses.
2015-05-18 12:06:43 +01:00
Peter Stephenson
52aeb9aaeb 35168: Improve parsing of case patterns.
"|" is now found properly by looking for words that come
from the lexical analyser, rather than hacking a pattern
returned in one dollop.

Update some completion functions that need extra quoting
as a result.

Add test for new parsing.

Update version number to 5.0.8-dev-3 because of wordcode
incompatibility.
2015-05-18 09:56:00 +01:00
Peter Stephenson
d52bf91659 35155: cmdpop() could be called erroneously on error 2015-05-15 20:26:08 +01:00
Peter Stephenson
0da0a0b9c7 35153: nested math substitution 2015-05-15 10:19:53 +01:00
Peter Stephenson
59a874f94e 35151: improved check for parameter q and b flags 2015-05-15 09:58:17 +01:00
Peter Stephenson
e86720190e 35131: allow "[]" to match empty character set.
This only works if there's no further "]" in the pattern,
since if there is the first "]" has to match a literal character.
2015-05-15 09:35:24 +01:00
Oliver Kiddle
63ffbab84d Øystein Walle: 34841 (tweaked): allow grouping of thousands in printf format string 2015-05-14 22:56:24 +02:00
Peter Stephenson
85a4cf9b36 35110: don't implicitly initialize restricted integers to zero 2015-05-14 09:28:57 +01:00
Oliver Kiddle
08fb0f6602 35092: fix for numeric arguments from vi operator pending mode 2015-05-13 23:07:09 +02:00
Peter Stephenson
f454ee26a8 35114: zformat -a multibyte char widths 2015-05-13 21:02:48 +01:00
Peter Stephenson
ec57c91b58 users/20203: nested functions in always blocks when exit pending 2015-05-13 16:17:04 +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
Jun-ichi Takimoto
a6db0b41ca 35064: rename ISPRINT to ZISPRINT to avoid conflict 2015-05-09 16:02:37 +09: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
Barton E. Schaefer
aa34d2f165 35046: unwind cmdstack when erroring out of lexing a parameter expansion in braces 2015-05-06 07:46:15 -07:00
Peter Stephenson
e6638bbd70 35032: Handle SIGCONT for process better.
Update job status as well as process status.
2015-05-05 19:17:36 +01:00
Oliver Kiddle
9afbe051b9 35029: improvements to newline handling for vi-mode word movement 2015-05-04 21:51:06 +02:00
Mikael Magnusson
1e6fb1a4f0 Fix two bugs in typeset_setbase 2015-05-04 04:26:11 +02: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
c96a993d51 34989: AUTO_CD needs to call cd --.
Otherwise directories looking like options do the wrong thing.
2015-04-28 20:42:26 +01:00
Peter Stephenson
df5115a741 34979: Preserve job text when doing shell job fix.
This handles list_pipe_text in execlist() along with other
variables that are saved and restored and, in the special
case of source, cleared.
2015-04-28 09:22:37 +01:00
Peter Stephenson
9f9a16f43c 34977: more reliable test if preprocessor is GNU 2015-04-28 09:20:15 +01:00
Barton E. Schaefer
a9c8b6a076 34966: "whence -v" for a function reports whether the function is autoloaded or its source file when known 2015-04-25 12:54:17 -07:00
Barton E. Schaefer
fae07f65a3 34965: consistent use of zalloc/zrealloc/zfree 2015-04-25 12:40:35 -07:00
Barton E. Schaefer
0164457a19 34961: $TZ is implicitly local in builtin strftime (originally workers/34602 from workers/34596) 2015-04-25 10:57:44 -07:00
Barton E. Schaefer
f8fb6ebae8 34961: clean up declarations of quote() and quotebreak() 2015-04-25 10:51:54 -07:00
Barton E. Schaefer
89a689e693 34961: replace a couple of free() with zfree() for consistency 2015-04-25 10:48:43 -07:00
Peter Stephenson
e0cdf39fd9 34955: save and restore list_pipe_job with its friends
This is needed to stop source() messing up job control.
2015-04-24 16:34:51 +01:00
Peter Stephenson
2e48eceb1a 34921: handle error in recursive par_event().
Here documents in an interrupted list caused bad juju.
2015-04-17 22:43:38 +01:00
Peter Stephenson
de22f2bfa6 34919: update interrupt parse error for ZLE cases.
Covers both send-break and push-input.
2015-04-17 17:37:26 +01:00
Peter Stephenson
4508d25710 34905: no parse error after keyboard interrupt.
Handled generally, though only showing up in special nested
cases.

Also fix ZLE so it doesn't cancel the interrupt flag when
not actually returning from a local keymap.
2015-04-17 10:23:58 +01:00
Peter Stephenson
3bf8cab82e 34900: assignment before an "exec".
Without POSXIBUILTIN: restore after, so we only get side effects.

With POSXIBUILTIN: keep set variable
2015-04-15 21:16:17 +01:00
Peter Stephenson
493fe2b444 unposted: rewrite Nularg math handling to be like other cases 2015-04-15 18:14:27 +01:00
Peter Stephenson
2ef4b38461 34892 (slightly tweaked): math evaluation fix
An empty expression resulting from substitution includes a
Nularg, which needs handling the same as an empty string.
2015-04-15 10:20:06 +01:00
Peter Stephenson
a2c579050f 34887: Fix POSIX_BUILTINS with assignment.
In the form
  var=val command special-builtin-or-func
the var is restored after execution, unlike the case where "command"
is absent.

Clear up case in code that handles this.

Add tests.
2015-04-15 09:44:19 +01:00
Barton E. Schaefer
d4f50f2d18 34851: fix thinko from 34093 that short-circuited some "whence -m" searches 2015-04-06 10:26:57 -07:00
Barton E. Schaefer
1fa68938dc 34837: avoid loss of original file path when applying colon-modifiers in glob qualifiers 2015-04-03 09:55:11 -07:00
Peter Stephenson
f1c702f2a4 34817: Catch some errors earlier when reading history.
Mostly for the case of an interrupt.

Don't try to process words when we know something's gone wrong.

Also abort history reading earlier on an interrupt.
2015-03-29 19:47:01 +01:00
Theo Buehler
b4aa9cdc76 34792: langinfo: Fix pointer type 2015-03-29 06:19:38 +00:00
Barton E. Schaefer
81ba837972 34781: add implicit space after alias expansion of tokens that form words without spacing
fixes crash when using completion immediately following such an alias
2015-03-28 21:24:27 -07:00
Barton E. Schaefer
7d2b53f65b 34804: refine POSIX_ALIAS change to preserve old behavior of [[ ]] conditionals 2015-03-28 21:08:02 -07:00
Barton E. Schaefer
ab4065623a 34788: refine errflag handling in cmd_or_math() 2015-03-27 11:54:55 -07: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
f6be7bc19f 34759: improve implementation of last commit 2015-03-22 19:21:10 +00:00
Peter Stephenson
4fb669a72d 34758: fix yet more history / command subst interaction.
In general we need to wind back over the history text input
inside command substitution because there's no level of
the input mechanism between history and the lexer.
2015-03-22 18:44:56 +00:00
Peter Stephenson
89aca2d0a0 34752: another fix for history expansion in cmd subst 2015-03-20 11:02:23 +00:00
Peter Stephenson
f48457a695 34742: history expansion inside command substitution failed.
Needs the case of alias expansion separating out.
2015-03-19 11:10:49 +00:00
Barton E. Schaefer
32b4cb0e73 34734: further aliasing adjustments and doc
restrict token aliasing (34641) to global aliases; tighten up POSIX_ALIASES to better match spec; update Aliasing doc to cover this and clarify older behavior

2015-03-18  Peter Stephenson  <p.stephenson@samsung.com>

	* 34723: configure.ac: turn off fixed site function directory if
2015-03-18 18:01:54 -07:00
Peter Stephenson
2f3547689c 34653: move aborted vared lines to ZLE_VARED_ABORTED 2015-03-06 09:51:16 +00:00
Peter Stephenson
506eaa0a63 34651: Avoid core dump if no lexical token 2015-03-05 10:02:38 +00:00
Jun-ichi Takimoto
4bc554bb8b 34636: replace broken isprint() on Mac OS X 2015-03-05 01:48:34 +09:00
Peter Stephenson
0ac87e3f59 34641: make it possible to alias tokens 2015-03-04 15:56:17 +00:00
Barton E. Schaefer
628d2f4f8a 34634: avoid infinite recursion on (/)# extendedglob 2015-02-27 10:10:19 -08:00
Peter Stephenson
c96606cc06 34623: free history more often if "remetafying" 2015-02-23 17:38:16 +00:00
Mikael Magnusson
ed43cf2768 34615 + 34619: Remeta one frame earlier 2015-02-23 18:09:47 +01:00
Peter Stephenson
6fa63a0ce2 34606: fix up nested arithmetic substitution
Arithmetic within a parameter substitution is a special
case that needs fixing with the introduction of the new
Inparmath token.

Add test.
2015-02-22 21:32:08 +00:00
Peter Stephenson
bcc4ab792d 34604: Work around problem with changes in Meta characters.
If reading in a file that contains characters that should be
metafied but are not, fix up on the fly.  Only need when using
HIST_LEX_WORDS.
2015-02-22 20:22:40 +00:00