1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-07-15 18:11:25 +02:00
Commit graph

224 commits

Author SHA1 Message Date
Peter Stephenson
29d0aa8ef8 29351: casts needed to pass integers through stdarg 2011-05-23 16:08:47 +00:00
Mikael Magnusson
0198b8423d 29224: Support negative LEN in ${VAR:OFFSET:LEN} like bash. 2011-05-19 16:24:38 +00:00
Mikael Magnusson
6a29bc80d0 29261: Add g:: flag. 2011-05-19 16:16:28 +00:00
Mikael Magnusson
72cb7cfc6f 29307, 29308 + replies: Fix some doubled words in docs and comments. 2011-05-19 16:10:46 +00:00
Bart Schaefer
6699851bcb 29313: better sh emulation with SHWORDPLIT and empty $IFS 2011-05-18 01:49:15 +00:00
Peter Stephenson
ee52e3c349 28936: ${#$} and ${#?} also didn't work 2011-03-21 11:09:50 +00:00
Peter Stephenson
4263d2b821 28889: ${##} should return the length of $# 2011-03-11 21:05:59 +00:00
Peter Stephenson
f2dca9e155 users/15864: turn zsh_directory_name into a hook 2011-03-11 16:32:07 +00:00
Peter Stephenson
aa58d139ff Mikael: 28637: ${foo:0:} caused crash 2011-01-18 10:29:58 +00:00
Bart Schaefer
66152e8ada 28530: replace (z+opts+) flag with (Z:opts:), add reserved (_🎏). 2010-12-15 04:05:50 +00:00
Peter Stephenson
eab4f9a83c 28528: Rearrange zleparse to lexflags
Add (z+n+)
2010-12-14 09:59:04 +00:00
Peter Stephenson
0a5702457b 28510: add (z+c+) and (z+C+) parameter flags 2010-12-12 22:44:50 +00:00
Peter Stephenson
fc6c76519b 28434: make ${NAME:OFFSET} always use zero-offset 2010-11-25 10:34:32 +00:00
Peter Stephenson
e6946adf57 28425: remove null arguments and untokenize 2010-11-20 23:46:26 +00:00
Peter Stephenson
8f20b2361c 28419: Doc/Zsh/expn.yo, Src/subst.c, Test/D04parameter.ztst:
KSH_ARRAY ${*:0:1} gives $0, etc.
2010-11-18 13:57:18 +00:00
Peter Stephenson
23bdfc7fd2 28418: add ${NAME:OFFSET:LENGTH} substitution 2010-11-18 10:07:55 +00:00
Peter Stephenson
3f3d80c394 28360: NO_UNSET option should check parameters with trailing options 2010-10-22 16:32:36 +00:00
Peter Stephenson
377f2bb812 28309: fix infinite loop padding with extra wide characters 2010-10-02 19:55:30 +00:00
Peter Stephenson
64d431d98b 28025: (D) parameter flag 2010-06-11 20:08:01 +00:00
Peter Stephenson
147cedfb6f 27965, 27966: Improve ${(q)...}: newline appears as $'\n;, 2010-05-27 18:57:34 +00:00
Peter Stephenson
11440d17d1 27889: Force more use of GLOB_SUBST in parameters if ~ is used 2010-04-20 21:16:21 +00:00
Peter Stephenson
e2d855f364 27865: fix problem with glob_subst in parameter subsitution 2010-04-09 15:40:13 +00:00
Peter Stephenson
815cc9fc0d rationalise widths of non-printing characters to zero. 2010-03-27 19:04:35 +00:00
Peter Stephenson
21193d7f01 users/14905 + 14906: problems with :s in parameter expansion 2010-02-27 00:18:13 +00:00
Peter Stephenson
4a0ddedf0a unposted: a couple of typeset -g's and a comment 2010-02-08 11:49:28 +00:00
Peter Stephenson
72529e4fa6 27304: add ${(q-)..} flag 2009-06-05 11:15:48 +00:00
Peter Stephenson
feb29659f1 users/14143 plus tweak in padding code:
use default IFS if IFS is unset
2009-05-20 09:04:39 +00:00
Peter Stephenson
3e1e46e9d2 26748: c modifier to add command path 2009-03-23 12:17:32 +00:00
Peter Stephenson
7733ade831 Michael Hwang: 26731 with cosmetic changes: add "a" and "A" modifiers
26736: document the above
2009-03-15 01:17:05 +00:00
Peter Stephenson
e391f09457 26705: multibyte characters with Meta in ${(%)foo} etc. 2009-03-10 11:12:02 +00:00
Peter Stephenson
c7d8b0dfb8 26546, 26556: sticky emulation for functions defined in emulate ... -c ...
environments, plus documentation
2009-02-11 20:42:15 +00:00
Peter Stephenson
14231691e1 26061: fix clash between process subst and numeric glob
26062: additional compmatch change, missed from 26047
2008-11-18 10:07:31 +00:00
Peter Stephenson
2fbc131ca8 26055: ensure process substitution is handled before parameter and command 2008-11-17 16:11:29 +00:00
Peter Stephenson
35a8612f21 26042 with some fixes from 26043 (Mikael):
allow <(...) and >(...) to occur in the middle of strings
and =(...) to have extra text following
2008-11-13 21:18:14 +00:00
Peter Stephenson
25833cc89e 25969: two bugs with metafication plus a test for one 2008-10-30 15:34:18 +00:00
Peter Stephenson
043959b0be 25760: add (~) flag 2008-09-27 20:58:24 +00:00
Peter Stephenson
4a34c96289 25755/25756: Jörg Sommer: improved handling of module arguments
25759: fix dynamic named directory crash, static named directory consistency
2008-09-27 19:57:25 +00:00
Peter Stephenson
b2d08a2155 25744: dynamic named directories and further doshfunc() simplification 2008-09-26 09:11:27 +00:00
Peter Stephenson
1f81bdcb47 25587: fix a==(stuff) and associated stuff. 2008-09-01 20:18:46 +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
cc026d2339 24788: ${(m)#...} returns string print width 2008-04-03 21:10:54 +00:00
Peter Stephenson
0076d68664 24611: fix ${+array[...]} for empty range 2008-02-27 15:51:26 +00:00
Peter Stephenson
2d03aa87fb 24264: restrict effect of 24234 to parameter substitution code and document 2007-12-16 14:05:14 +00:00
Peter Stephenson
5d5d1bef6e 24234: apply typeset parameter flags consistently 2007-12-13 20:52:52 +00:00
Peter Stephenson
a232ab5624 users/12149: "@" with splitting in double quotes retains empty fields 2007-10-30 14:01:32 +00:00
Peter Stephenson
4d52b7ebe6 23670: rationalise some linked list functions 2007-06-27 13:56:10 +00:00
Peter Stephenson
abae4fe16e 23562: add KSH_ZERO_SUBSCRIPT option and leave off by default 2007-06-18 13:25:03 +00:00
Peter Stephenson
a35302ebd4 23257: buffer too short for multibyte ${(#)...} evalution 2007-04-02 11:00:35 +00:00
Bart Schaefer
3fc59a0f09 23176: apply the (X) parameter flag to the (#) flag; fix comment typo. 2007-02-25 23:41:03 +00:00
Peter Stephenson
0a532a8f7f fix metafication of ${(#)x} 2007-02-10 22:12:58 +00:00
Peter Stephenson
54d692c4b5 23143: make =-expansion with metacharacters more consistent 2007-02-02 21:42:14 +00:00
Wayne Davison
ecaf124c95 Silenced a compiler warning by making an int unsigned. 2007-01-26 19:18:17 +00:00
Peter Stephenson
553e011320 23118: improve sorting to make it work with locales 2007-01-21 22:47:36 +00:00
Peter Stephenson
481d1b7560 23114: ${foo:s/bar/rod} broken 2007-01-18 17:27:10 +00:00
Peter Stephenson
d8e36bffa2 23052: multibyte characters in typeset -L/R/Z padding 2006-12-13 22:30:37 +00:00
Peter Stephenson
34381548da Incomplete improvements for $'...' in completion 2006-12-03 21:07:17 +00:00
Peter Stephenson
b09a7cc5bf 22997: fix ${...?...} exit and traps 2006-11-11 13:16:10 +00:00
Peter Stephenson
f367a90505 22980: 22952 messed up parameter padding flag optional arguments 2006-11-07 22:47:07 +00:00
Peter Stephenson
d8207acddb 22952: fix some argument delimiters to work with multibyte characters 2006-11-02 18:43:19 +00:00
Peter Stephenson
9471bbcfa0 22934, modified, see 22937: add HIST_SUBST_PATTERN option
make ${.../#%...} anchor at both ends
2006-11-01 12:25:18 +00:00
Peter Stephenson
289b14113b 22819: improved internal use of string quotation,
plus completion bug fix with RCQUOTES
2006-10-05 21:53:26 +00:00
Peter Stephenson
8f98285662 22765: rename some MB_ macros to WC_ for consistency. 2006-09-23 20:25:05 +00:00
Andrey Borzenkov
71fa876def 22761: fix compdescrie for multibyte characters 2006-09-23 14:43:57 +00:00
Peter Stephenson
2bfad02a94 22742: parameter padding uses string lengths unless (m) flag set
22743: restrict sh "- [args]" -> "-xv [-- args]" hack to sh mode
2006-09-20 09:22:34 +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
6371325fdf 22689: untokenize strings used in parameter substitution pattern matching 2006-09-12 09:56:25 +00:00
Peter Stephenson
80acfd135c 22684: improve getkeystring() interface and make printf do octal escapes 2006-09-10 18:10:48 +00:00
Peter Stephenson
b726ead94e 22676, 22678: extend sched and make it able to run events when waiting for
input
2006-09-10 15:24:26 +00:00
Peter Stephenson
50e9ab122b 22556: Multibyte separators and delimiters 2006-07-24 22:00:19 +00:00
Peter Stephenson
4a67f24798 22544: Improve use of ztype tests for multibyte characters. Add
POSIX_IDENTIFIERS option to control allowability of multibyte
alphanumeric characters in parameter and module names.
2006-07-10 13:08:22 +00:00
Peter Stephenson
92737d2c42 22526: enhance ${(#)...} to handle Unicode 2006-06-28 14:34:27 +00:00
Peter Stephenson
6157c14d06 22525: lengths and cases of multibyte strings in parameters and history 2006-06-28 13:12:55 +00:00
Peter Stephenson
dd5602f59b 22474: use variable argument lists to improve error message handling 2006-05-30 22:35:03 +00:00
Peter Stephenson
16f7f6961f 22375, 22376: ${(0)...} splits on NULL byte 2006-03-22 18:32:46 +00:00
Wayne Davison
f8c7d72f30 Use the new "flags" integer to get rid of the mult_isarr global. 2006-03-07 22:05:51 +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
803fa9872f Made ${(A)=name:=word} (which is an array assignment) not split on
quoted whitespace, just like the new ${1+"$@"} handling.
2006-02-16 19:51:48 +00:00
Wayne Davison
1811ec9b78 Fixed another ${name+word} problem when word consisted of an
array followed by a scalar.  Also updated several comments.
2006-02-15 18:35:35 +00:00
Wayne Davison
d0ea78e557 - Fixed: setopt shwordsplit; set 1 '2 3' 4; print -l ${1+"$@"}
- Fixed: setopt shwordsplit; foo='1 2'; print -l ${==foo+$foo}
- Fixed: emulate sh; touch '1 2'; print -l ${1:-*\ *}
- Improved multsub() and its comments.
2006-02-15 10:13:41 +00:00
Peter Stephenson
8b0cc87817 22195: don't set HOME in the shell 2006-02-06 11:57:03 +00:00
Peter Stephenson
f42d15278d 21967: add ${(#)...} substitution 2005-11-01 18:04:24 +00:00
Peter Stephenson
3c37057c34 21871: replace INULL() by inull() 2005-10-13 16:30:13 +00:00
Peter Stephenson
cca66ab341 21862/21863: GLOB_SUBST shouldn't swallow up backslashes in parameter
substitutions that don't match anything.
2005-10-11 16:48:05 +00:00
Peter Stephenson
69b4b8bdde 20605: Use separate structure with get/set/unset methods fro parameters.
Separate justification width of parameters from base/precision.
2004-12-07 16:54:58 +00:00
Peter Stephenson
7f26993e99 20112 changed c.f. 20113:
fix here string and here document expansion and quoting
2004-06-28 15:38:10 +00:00
Wayne Davison
fb0937a69e Marked unused parameters with the new UNUSED() macro. 2004-06-02 22:14:25 +00:00
Wayne Davison
327481b391 Silenced one signed/unsigned comparison compiler warning. 2004-05-28 19:22:17 +00:00
Peter Stephenson
bab0f3b920 18982: comments/rant for paramsubst(), accidentally uncommited 2003-08-30 19:12:18 +00:00
Peter Stephenson
a87ce0fb25 users/1654: anchors did'nt work with // parameter substitution 2003-06-05 11:05:01 +00:00
Peter Stephenson
46557b1e1c 18569: pointer error with ${(on)...} 2003-05-22 10:11:00 +00:00
Peter Stephenson
c7a2d2225e 18565: bug when ${(u)...} reduced array to length 1 2003-05-21 16:20:54 +00:00
Peter Stephenson
4f9580ec03 18508: quoting of separator in ${foo//../..} was buggy 2003-05-07 09:38:49 +00:00
Bart Schaefer
cefd2de2e1 Split tokenize() into shtokenize() and zshtokenize()
to improve SH_GLOB handling, particularly in completion
2002-05-06 14:46:11 +00:00
Oliver Kiddle
73a4362713 16620, 16697: add a and n parameter expansion flags 2002-02-22 17:28:04 +00:00
Bart Schaefer
0524ab98ff 16400, 16401: preserve empty words that result from brace expansion. 2002-01-06 01:09:09 +00:00
Clint Adams
8659013fb8 16357: change (n) to (u) so (n) can be reserved. for numeric sorting. 2001-12-17 14:06:27 +00:00
Clint Adams
56854a2fb6 ref 16347: tweaks 2001-12-17 01:16:36 +00:00
Clint Adams
1e103ebef3 16345: (n) flag to remove duplicate array values during expansion. 2001-12-16 20:53:44 +00:00
Bart Schaefer
be640ed587 16215: save and restore mult_isarr in singsub() 2001-11-03 23:34:50 +00:00
Peter Stephenson
cc0d931682 15931: EXIT traps from exit in subshell; 15965: glob -> zglob 2001-10-08 08:13:11 +00:00
Bart Schaefer
5fdcd3a2b4 Equivalence of $(...) and ... in ${(e)...}. 2001-09-25 17:37:54 +00:00
Sven Wischnowsky
c0ea4d62c8 handle possible NULL pointer returned from bufferwords() (15717) 2001-08-28 08:41:51 +00:00
Peter Stephenson
23581f7664 15586: remove =alias expansion, leaving only =cmd. 2001-08-07 10:18:31 +00:00
Peter Stephenson
c26704f7a3 Added KSH_TYPESET option. 2001-06-12 10:34:57 +00:00
Bart Schaefer
90a1316345 Fix re-set of integer special params after unset. 2001-05-19 00:31:22 +00:00
Sven Wischnowsky
11e3147466 try to make ${(e)..} work for complicated parameter expansions in the value; this means: keep Qstring tokens unchanged if they are inside double quotes and tokenizing patterns in parameter expansions (14381) 2001-05-18 12:39:24 +00:00
Bart Schaefer
ba9541fb5d BDIGBUFSIZE for binary conversions. 2001-04-28 17:38:00 +00:00
Bart Schaefer
e2e9121893 Subscripting optimization and error checking. 2001-04-24 05:45:16 +00:00
Bart Schaefer
af2ae90d25 Fix "${=foo=$@}". 2001-02-16 17:16:13 +00:00
Bart Schaefer
04e1ef5b68 Partial sh emulation fixs for ${1+"$@"} and "${foo=$@}". 2001-02-16 08:43:46 +00:00
Sven Wischnowsky
757168e2c8 remove 13108 (trap queues); replace with signal queueing to ensure that user signal handlers are only executed when it is safe to run them (13365) 2001-01-16 13:44:18 +00:00
Bart Schaefer
1add53c578 Fix parsing of := for magicequalsubst. 2000-06-17 19:51:51 +00:00
Peter Stephenson
6b87e6fda3 11838: typeset -H 2000-06-09 15:37:05 +00:00
Sven Wischnowsky
4900804b61 make (e) flag be silent unless (X) is given, too (11768) 2000-06-06 08:35:54 +00:00
Wayne Davison
91d5f73434 Changed the array "len" to be "end" -- a 1-relative index of the last
item (or you can think of it as pointing one past the last item).
2000-06-02 01:54:16 +00:00
Peter Stephenson
4608712264 FR & pws: promptexpand memory leaks; NEWS notes 2000-06-01 09:10:15 +00:00
Peter Stephenson
7bf294f2b8 Wayne: pattern.c unitialised var
Zero-length arrays now possible with $array[1,0]
2000-05-31 08:56:23 +00:00
Peter Stephenson
8d17d2f02d 11467: [#<base>] syntax for output base
zsh-users/3071: compdump tweak to avoid // in path
2000-05-19 18:22:50 +00:00
Sven Wischnowsky
0e5666e2ad detect additional characters in parameter expansions and signal an error for them (11380) 2000-05-15 14:59:01 +00:00
Peter Stephenson
38bb84d975 11194, 11200, 11214 2000-05-08 08:58:37 +00:00
Sven Wischnowsky
70e5b622ff new (z) parameter flag to do shell-word splitting on the value (11113) 2000-05-03 12:21:55 +00:00
Peter Stephenson
d2330ba055 10547: (#s) and (#e) pattern assertions 2000-04-06 18:44:01 +00:00
Tanaka Akira
e74702b467 Initial revision 1999-04-15 18:05:38 +00:00