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

74 commits

Author SHA1 Message Date
Jun-ichi Takimoto
a4020e10a3 37868: add 'static' to file local variables 2016-02-03 01:25:33 +09: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
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
c6c9f5daf2 34322: bug with interface to parsestr() etc.
Was showing up in places like ${(e)...} where command substitution
could reallocate the token string, but actually there was never any
guarantee that the lexer wouldn't do that, so this was always
a bit iffy.
2015-01-18 22:38:57 +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
Barton E. Schaefer
7cabee52d8 33256: fix prompttrunc() counting of %{ %} spans 2014-09-27 09:26:21 -07:00
Barton E. Schaefer
5b57f28256 33070: add %(e..) based on %e 2014-08-30 14:11:58 -07:00
Peter Stephenson
711e1427b5 33057: %e in prompts shows evaluation / execution depth 2014-08-29 09:46:34 +01:00
Barton E. Schaefer
6fc3b67b80 32971: negative argument with %(l..) and with %<< or %>> calculates space available before right margin 2014-08-07 09:26:09 -07:00
Peter Stephenson
d3d0910293 32918: add %. to ztrftime for use in prompts 2014-07-30 12:10:15 +01:00
Mikael Magnusson
8a9b141652 30496: Parse argument to %F and %K as prompt sequences 2013-03-10 12:33:04 +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
d89361739a 29165: use term.h globally if needed at all. 2011-05-09 09:49:08 +00:00
Frank Terbeck
2eac105770 28853: Fix typo: preceed -> precede 2011-03-04 13:25:25 +00:00
Peter Stephenson
4ad0a25af1 27983: colours could be output twice 2010-06-03 19:36:16 +00:00
Peter Stephenson
b4c2ea2cec 27125: handle nested use of colour code buffer allocation 2009-07-10 21:32:44 +00:00
Peter Stephenson
feb2df4b63 26958: Fix reallocation problem in prompts 2009-05-12 19:58:04 +00:00
Peter Stephenson
337530b4d6 25930: dynamic directory expansion memory handling was screwy 2008-10-24 10:27:25 +00:00
Peter Stephenson
e3fd25b181 25775: fix logical problem with function line numbering inside eval-style traps 2008-09-29 21:46:58 +00:00
Peter Stephenson
84584ea58b 25684: make %x and %I consistent with eval line numbering 2008-09-25 11:26:00 +00:00
Peter Stephenson
2920c227d3 25677: add %x and %I prompt escapes for shell source code debugging
tidy up interface to doshfunc()
2008-09-16 15:02:01 +00:00
Peter Stephenson
14905ddc74 25672: remove unnecessary Nularg when prompt expanding
to avoid problem with glitch space
2008-09-15 16:18:06 +00:00
Peter Stephenson
a440669201 25242: Mikael V prompt test for contents of psvar 2008-06-24 08:44:14 +00:00
Peter Stephenson
9533b19dad 25051: add colour sequences to formatting strings in completion 2008-05-16 09:37:56 +00:00
Peter Stephenson
bd70d684fc 25002: only ZLE should update attributes resulting from prompt expansion 2008-05-12 13:50:42 +00:00
Peter Stephenson
d2b0a6daa5 unposted: fix uninitialised variable 2008-05-09 17:41:57 +00:00
Peter Stephenson
c811a18d44 24986: prompt escapes for colours 2008-05-09 17:33:49 +00:00
Peter Stephenson
2cec7aae44 24861 (with tweaks): logic to use alternative wcwidth() if needed;
slightly improve test for overwriting with combining characters.
2008-04-22 15:08:04 +00:00
Peter Stephenson
65520f1901 24566: fix prompts with glitch spaces a bit more 2008-02-17 18:15:04 +00:00
Peter Stephenson
7da98c5124 24556: %G in prompt for glitch characters 2008-02-15 23:59:05 +00:00
Peter Stephenson
a47971f5b7 add some mod_export tags where needed 2007-11-20 09:55:09 +00:00
Peter Stephenson
6567e77a4e 24007: prompt allocation and use of "shout" 2007-10-22 10:22:16 +00:00
Peter Stephenson
78d1939ffd 22753: minor character bugs spotted on Cygwin 2006-09-21 16:36:53 +00:00
Peter Stephenson
bb3628e898 assume width 1 for control characters;
don't crash if width of repeated padding string is 0
2006-09-15 13:17:27 +00:00
Peter Stephenson
a242b1eb35 22705: make ${(l...)...} and ${(r...)...} handle multibyte characters 2006-09-13 20:55:29 +00:00
Peter Stephenson
48d6402e65 rationalise mb<->wc conversions to use restartable form 2006-08-03 15:37:49 +00:00
Peter Stephenson
9d5f320f38 22542: deoverenthuse cmdpopping 2006-07-09 14:47:22 +00:00
Wayne Davison
4cb83571c4 Changed some structures to avoid gcc's type-punned warnings. 2006-03-07 21:30:36 +00:00
Wayne Davison
f211604396 Tweaked the code that handles %D so that: (1) we don't free() a NULL
pointer (we use zsfree() instead), and (2) we avoid a rare bug that
could call free() on same memory twice (e.g. "%D{}%D").
2006-01-17 22:14:40 +00:00
Wayne Davison
78ddb65f6c Got rid of some superfluous STOUC() calls (such as the ones I added
for the arg of calls to nicechar(), which doesn't need this).
2006-01-13 17:13:49 +00:00
Wayne Davison
394a6b3567 A better version of my last change. 2006-01-13 09:43:46 +00:00
Wayne Davison
325c9a1de5 Metafy the output of the ztrftime() string since that's what the
prompt expects and some date names might not be ASCII.
2006-01-13 09:25:09 +00:00
Wayne Davison
eebfabe548 - The return value of mbrtowc() is a size_t (unsigned), so don't
assign it to an int and then check for negativity, as that won't
  work on a system where an int is larger than a size_t.
- When mbrtowc() returns -2 when given all the remaining chars in a
  string, set an end-of-line flag and avoid calling mbrtowc() again
  for any of the incomplete characters that remain in the string.
- Use STOUC() when passing a char value to nicechar().
- Use "mbs" for the multi-byte state variable name (for consistency).
- Be sure to reset the mbs state if mbrtowc() returns -1.
- Use the new MB_INVALID and MB_INCOMPLETE defines for the size_t
  -1 and -2 values (respectively).
2006-01-12 00:51:41 +00:00
Peter Stephenson
aea7715261 21943, 21945: ZLE_UNICODE_SUPPORT -> MULTIBYTE_SUPPORT;
use multibyte versions of nicechar wherever possible.
2005-10-28 17:34:33 +00:00
Bart Schaefer
533021f2ad Fix --disable-multibyte compile error. 2005-10-23 19:28:20 +00:00
Peter Stephenson
e3856ef52e remove a couple of TODOs 2005-10-21 22:40:30 +00:00
Peter Stephenson
2ddaeb605f 21890: fix segmentation error in left prompt truncation and a couple of minor
inconsistencies
2005-10-19 21:59:34 +00:00
Peter Stephenson
4ca967e200 21882: extend prompt truncation to handle multibyte characters 2005-10-19 08:39:02 +00:00
Peter Stephenson
cc81bba1e3 21870: bad INULL() definition
21869: multibyte characters in %-substitutions, invalid multibyte
characters in completion listings
2005-10-13 13:19:29 +00:00
Clint Adams
fdd0397411 Stephen Rueger: 21744: unconditionally assume that \t or \n are not part of multi-byte characters. 2005-09-22 01:36:35 +00:00