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

2766 commits

Author SHA1 Message Date
Peter Stephenson
880020ca2e 32624: use correct scaling factor (clock ticks) for times 2014-05-29 21:40:33 +01:00
Peter Stephenson
1cc3424cbe unposted: use DIGBUFSIZE for pipestatus numeric buffer 2014-05-29 20:17:30 +01:00
Jun T
d082827c83 32616: bad printf arguments for limits 2014-05-18 18:23:16 +01:00
Barton E. Schaefer
9d47e8398d 32609: [[ $var ]] behaves as [[ -n $var ]] for bash/ksh compatibility
Also restore ksh [ -t ] compatibility when POSIX_BUILTINS is not set, and
allow operators defined by modules to be called with no arguments, although
this affects only runtime interpretation, not parsing.
2014-05-13 08:16:50 -07:00
m0viefreak
f5fe52c495 32600: in _arguments, "-" is not an option letter after another "-" 2014-05-08 14:24:31 +01:00
Tomoki Sekiyama
0da28f323d 32592: add CORRECT_IGNORE_FILE variable 2014-04-29 10:44:09 +01:00
Barton E. Schaefer
979f72199f 32580: avoid indefinite wait in lockhistfile() by checking for lock file time stamp in the future
Also change behavior of HIST_FCNTL_LOCK to use only fcntl() locking, rather
than applying both kinds of lock.
2014-04-25 08:30:18 -07:00
Barton E. Schaefer
9da59238ff 32569: lastval ($?) should not be reset between word list substitution and loop body execution in for/select
Remove one other redundant and therefore confusing assignment to lastval.
2014-04-20 11:09:51 -07:00
Barton E. Schaefer
848badaa5f 32568: consistency in handling of errflag condition during substitutions
Affects for/select word lists, function definition name position, and
anonymous function argument lists.
2014-04-20 10:27:15 -07:00
Andrew Waldron
8189e12312 32552 (updated by 32560): fix segfault when using process substitution in anonymous function argument list
Also disallow process substitution in function name position.
2014-04-18 07:30:36 -07:00
Barton E. Schaefer
31e2ae380a 32540: in doexpandhist(), discard saved line position data rather than restoring from it (updates 32531). 2014-04-13 01:26:07 -07:00
Barton E. Schaefer
f61037a0b0 32531: fix memory leaks detected by valgrind 2014-04-06 09:55:49 -07:00
m0viefreak
cd2eb07a78 m0viefreak: users/18655,18657,18660: assorted auto-removable suffix fixes
Src/Zle/compresult.c, Src/Zle/zle_misc.c, Src/Zle/zle_refresh.c: fix
auto-removable suffix highlighting

Completion/Unix/Command/_git: fix compadd for auto-removable suffix in
_git_commit_ranges and _git_stash
2014-03-23 13:02:12 -07:00
Barton E. Schaefer
8672d19f0c 32500: handle interrupts during pattern matching 2014-03-20 07:56:30 -07:00
Peter Stephenson
a06cd1766a 32479: POSIXTRAPS and implicit return values.
With POSIXTRAPS never propagate implicit return value.
In any case if not forcing a return value don't use lastval
from within the trap, use the one from the surrounding code.
2014-03-14 12:52:41 +00:00
Jun T
ba44ba6e6f 32480: Fix crash in vi mode with too few previous changes 2014-03-13 16:29:19 +00: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
Oliver Kiddle
f62bd9c06c 32450: make get-line widget set the history number that was saved with the line 2014-03-03 12:17:28 +01:00
Oliver Kiddle
97115e0e7f 32448: fix seg fault if $WIDGET is accessed after recursive-edit is interrupted 2014-03-03 12:14:01 +01:00
Oliver Kiddle
b5fcc04f0e 32436: allow = to be used in ZLS_COLORS patterns if it is quoted or inside parentheses 2014-03-03 11:57:56 +01:00
Manuel Presnitz
973e5dc37d 32412 / 32415: New giga- and terabyte units for glob qualifiers 2014-03-01 19:08:17 +00:00
Barton E. Schaefer
7e04c1a53d 32427: avoid busy loop on closed descriptors for "zle -F" handlers
Also assure the handlers are called on error conditions and document the
extra argument that is passed in the error case.
2014-02-23 18:14:12 -08:00
Peter Stephenson
73db206838 32414: improved error message for missing delimiters.
For glob qualifiers "u" and "g".
2014-02-19 15:34:17 +00:00
Barton E. Schaefer
956d35ef12 32388: zparseopts -K preserves individual associative array elements 2014-02-15 13:49:26 -08:00
Oliver Kiddle
90916c4e08 32361: don't reset lastline before completion 2014-02-14 22:51:33 +01:00
Barton E. Schaefer
ba58bfe4bf 32365: another stab at the heuristic for initializing rprompt_indent 2014-02-08 14:49:39 -08:00
Oliver Kiddle
e1bc9d0a44 32342: fix overstrike for vi mode and use varying vi commands at line start 2014-02-05 21:55:18 +01:00
Oliver Kiddle
2cd3b9ab74 32334 (modified so KEEPSUFFIX is unchanged for vi-cmd-mode; based on
Jun T: 32324, 32330), 32347, Jun T: 32344, 32349:
add split-undo zle widget for configurable breaks in undo sequence
2014-02-05 21:45:19 +01:00
Barton E. Schaefer
71b235bfa7 32341: heuristic initialization of ZLE_RPROMPT_INDENT 2014-02-02 14:07:23 -08:00
Barton E. Schaefer
620b915c4e Fix leading whitespace in a comment 2014-02-02 13:37:36 -08:00
Barton E. Schaefer
3882c30f80 32340: improve error messages for "read -c" / "read -l" 2014-02-02 13:28:41 -08:00
Barton E. Schaefer
f3e7cfe47c 32337: change initialization of some special parameters for emulation compatibility 2014-02-02 13:16:16 -08:00
Oliver Kiddle
a8c4ed64ee 32314: merge undo events corresponding to vi change in the vi-cmd-mode widget so undo from insert mode is useful again 2014-01-31 14:03:47 +01:00
Peter Stephenson
584ea88811 32303: simplistic completion after $x: 2014-01-28 19:14:30 +00:00
Peter Stephenson
c56f5aed59 32308: Improve initialising of vi change.
Better handling when entering viins on entry to editor.
Slightly changed since post to use vi command a.
2014-01-28 16:12:41 +00:00
Peter Stephenson
a0c9da72f2 unposted: update 31983 to suppress stdout from cmp, too.
Gets rid of unnecessary messages building patchlevel.h.
2014-01-27 15:42:48 +00:00
Peter Stephenson
22b8fd6da9 32299: add use of underscores on arithmetic output for spacing 2014-01-23 10:32:59 +00:00
Barton E. Schaefer
6c603a4127 unposted: reformulate 32285 to lift the fheap->sp test out of the loop, improve commentary 2014-01-22 21:47:29 -08:00
Barton E. Schaefer
3e06aeabd8 32294: prevent buffer overflow when scanning very long directory paths for symbolic links 2014-01-19 19:39:31 -08:00
Barton E. Schaefer
23f98c3e1d 32285: restart the fheap search in freeheap if the current fheap arena is about to be discarded; fixes crash 2014-01-18 21:22:11 -08:00
Barton E. Schaefer
1584318b97 32283: fix crash in menu selection when number of terminal lines is small 2014-01-18 12:32:21 -08:00
Peter Stephenson
ed44ddad22 32246: option "shift -p" pops arguments from end of array 2014-01-11 19:31:29 +00:00
Peter Stephenson
d26461a3c6 users/18298 (tidied up): add {<char>..<char>} expansion 2014-01-09 10:05:13 +00:00
Carl Drougge
60372fbda6 32196: copy-prev-shell-word needs a lexer flag 2014-01-02 20:49:04 +00:00
Barton E. Schaefer
120145561f 32208: always reset pathchecked when the path array is modified 2013-12-30 23:31:35 -08:00
Barton E. Schaefer
1136b9b296 32182: re-enable command completion after a separator 2013-12-25 16:24:27 -08:00
Barton E. Schaefer
15f4843c67 32178: fix another acquire_pgrp() infinite loop 2013-12-25 16:20:49 -08:00
Peter Stephenson
aede5c52bf 32176: plug additional deadlock-inducing pipe descriptor leaks 2013-12-21 17:41:21 -08:00
Barton E. Schaefer
9887fc3d7b 32171: close pipe descriptor in parent when left side is a shell construct to
prevent deadlock

Also clean up ChangeLog entry that attributed 32119 to 32114
2013-12-20 23:03:46 -08:00
Barton E. Schaefer
9cacf4411f 32157: fix extra line feed after prompt, and erased character in completion listing, when ZLE_RPROMPT_INDENT=0 2013-12-18 23:45:20 -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
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
Patrick Oscity
977f9ff5c8 32114: ZLE_PROMPT_INDENT allows you to move rprompt flush right 2013-12-16 21:35:21 +00:00
Barton E. Schaefer
bcda34a0b3 32099: change pointer declaration to avoid arithmetic on (void *). 2013-12-10 14:22:10 -08:00
Daniel Shahaf
b28a6365f6 32091: WARN_CREATE_GLOBAL false positive.
In cases like () { foo=bar =true; }
2013-12-06 09:28:42 +00:00
Barton E. Schaefer
5618116020 32061: Fix "use of uninitialized memory" in metafy 2013-11-27 22:09:48 -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
Peter Stephenson
8e2d4c2cf7 32030: need to revert empty glob qualifier change.
It failed on an empty expansion that (N) was supposed to remove.
Add test for this case.
2013-11-20 17:35:57 +00:00
Barton E. Schaefer
b514fbe110 32023: better interrupt handling at RM_STAR_WAIT 2013-11-19 08:30:10 -08:00
Barton E. Schaefer
12fb09c336 31995: Han Pingtian: glob qualifiers cannot follow an empty pattern, so a leading paren means grouping 2013-11-18 08:24:54 -08:00
Peter Stephenson
bd919f30ae 32001: fix crash on ${:*} and ${:|} 2013-11-17 20:33:57 +00:00
Peter Stephenson
11d8781a3f 31983: suppress warning from cmp when genering patchlevel.h.
The warning doesn't indicate a problem, so isn't useful.
2013-11-14 11:59:35 +00:00
Peter Stephenson
4c611f9323 31982: detection of floating point constants was problematic.
Remove the cause and fix the original problem with floating point
numbers with leading zeros (users/17445) a different way.
2013-11-14 11:49:22 +00:00
Peter Stephenson
7a94960957 31977: It's OK to autoload a feature that's loaded.
Simply check that the feature is from the same module that's requested.
2013-11-13 22:14:27 +00:00
Peter Stephenson
2fc2bb7c17 31961: rationalise fd watching to use structure 2013-11-12 20:41:06 +00:00
Peter Stephenson
f77a7a5b18 31937: zle -Fw uses widget semantics for file descriptor handler 2013-11-07 15:19:07 +00:00
Peter Stephenson
375115c7df unposted: updates for 4.0.2-test-1.
Update references to 4.0.2 to 4.0.3.
Additional mod_export declarations.
Additions to .distfiles.
2013-11-06 19:25:07 +00:00
Stefan Neudorf
73746daf7f 31936: Rationalise limits for threads 2013-11-03 19:51:34 +00:00
Stefan Neudorf
93dec3a96a 31935: further updates to limits for BSD 2013-11-03 19:47:00 +00:00
Stefan Neudorf
790a4fee2b 31930 / 31934: New limits from BSD.
Avoid clash of uses for ulimit -k.
2013-10-31 20:25:13 +00:00
Barton E. Schaefer
ed01d6e1e8 31929: Src/jobs.c: fix DPUTS3() test condition from 31906. 2013-10-29 09:28:20 -07:00
Peter Stephenson
cbe9371023 31922: zlecharasstring missed flip of bit 5 after Meta 2013-10-28 17:51:38 +00:00
Barton E. Schaefer
c98cbe25d2 31919: fix deadlock when a shell builtin with a multio redirection is used on the left side of a pipeline
Make sure stdin/out/err file descriptors are closed for the multio copy
process, which means not re-using those descriptors after they are closed
and marked FDT_UNUSED in fdtable[].  For completeness, initialize their
fdtable[] state to FDT_EXTERNAL.
2013-10-27 15:42:00 -07:00
Barton E. Schaefer
c39d2f8e49 31912: in closemn(), distinguish closing for >&- from closing for a real redirect
Fixes knock-on multios bug introduced by workers/20666 way back in 2005.
2013-10-27 11:27:41 -07:00
Barton E. Schaefer
eec5140dde Merge overlapping ChangeLog entries 2013-10-26 16:19:12 -07:00
Barton E. Schaefer
c3114a7735 31906: fix race-condition interaction of $pipestatus with job control
printjob() should not reference oldjobtab for job numbers unless it is being called from bin_fg().  printjob() also must not attempt to update pipestats when called from bin_fg().  acquire_pgrp() should not loop infintely if the shell is not interactive.  Update the $pipestatus stress test so that it also exercises the oldjobtab repair.
2013-10-26 16:11:40 -07: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
Barton E. Schaefer
5b30149638 31885: fix PIPEFAIL when the last command executes in the current shell 2013-10-24 17:31:13 -07:00
Peter Stephenson
1c172cb080 31877: fix behaviour of disable -p with parentheses 2013-10-24 18:45:50 +01:00
Peter Stephenson
7a5b85292a 31882: Insulate completion widget against environment.
Prevents change in pipestatus leaking back out.
2013-10-24 17:49:37 +01:00
Barton E. Schaefer
65e131c838 31879 plus misc.: improve $pipestatus handling and add a test for it 2013-10-23 22:45:02 -07:00
Barton E. Schaefer
21bbd96d0d 31869: reduce WINCH-twaddling in shingetline() 2013-10-21 08:36:52 -07:00
Peter Stephenson
9a044f1a6a Use VERBOSE option in execstring() 2013-10-19 23:08:24 +01:00
Peter Stephenson
8879c46a48 31846: fix NOEXEC option in execsimple() optimisation 2013-10-18 23:42:07 +01:00
Bart Schaefer
978b5bcc8d 31832: make execrestore() more signal-safe. 2013-10-17 07:35:05 -07:00
Barton E. Schaefer
ff520d1b79 31823: add HISTORY_IGNORE parameter
HISTORY_IGNORE defines a pattern to exclude matching lines in the internal
history from the HISTFILE at write time.
2013-10-17 07:28:52 -07: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
Mikael Magnusson
fa03332635 31805: Add $patchars and $dis_patchars to zsh/parameter module 2013-10-11 14:57:57 +02:00
Peter Stephenson
d0fe73c5fb 31815: another fix for INCAPPENDHISTORY change.
We need to save immediately if something is pushed on the history stack
to ensure we use the right file before popping.
2013-10-11 11:13:03 +01:00
Peter Stephenson
68a9bab11d 31809: Make whitespace clear in trace output for patterns. 2013-10-10 17:12:50 +01:00
Barton E. Schaefer
8ffdf161c7 31797: to match documentation, avoid expanding history when there is neither a
word nor an event designator

There are still a few cases where expansion is attempted even though the
documentation indicates it will not be, but in most of those cases the
expansion will fail.  The now-fixed case would fall back to default
expansion of the previous command.
2013-10-08 07:21:29 -07:00
Peter Stephenson
6f195241f3 31794: further refinement to INCAPPENDHISTORY change.
With SHAREHISTORY we should make sure the code behaves as it always
did, because it takes care about locking a file once for reading
and writing.
2013-10-07 13:01:26 +01:00
Peter Stephenson
9345e57859 31793: Fix problem with non-interactive history.
Modify 31789 so it doesn't try to save history from hbegin()
in that case.
2013-10-07 11:43:55 +01:00
Peter Stephenson
5236425865 users:18023: Add PIPEFAIL option 2013-10-06 21:35:27 +01:00
Han Pingtian
16ff79a885 31789: Save history for INCAPPENDHISTORY later.
This improves the timing recorded in the history.
2013-10-05 22:03:43 +01:00
Barton E. Schaefer
75fdec17b1 31784: better line width calculation for completion listings
When deciding whether there is enough horizontal space to show completion
descriptions for each match in a listing, treat the separator as part of
the description rather than as part of the match, and account for lines
that have already wrapped due to very long matches.
2013-10-03 15:59:52 -07:00
Barton E. Schaefer
ea30fdaf25 31781: "compdescribe -i" clears the completion list column padding width 2013-10-03 14:52:54 -07:00
Barton E. Schaefer
ae92cadc75 31772: queue_signals() to prevent re-entry into endparamscope(). 2013-09-26 21:27:27 -07:00
Barton E. Schaefer
98b0828c63 31770: memmove() instead of memcpy() for overlapping regions. 2013-09-26 21:24:58 -07:00
Peter Stephenson
0ed3c5ccd0 31765: If zle starts in viins mark as insertion.
This allows undo to work on everything entered.
2013-09-25 18:42:59 +01:00