summary refs log tree commit diff
path: root/Etc/NEWS
blob: abd4ae8b2cbd431f8b572cce07764fd972f6048d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
-------------------------------------
CHANGES FROM PREVIOUS VERSIONS OF ZSH
-------------------------------------
				     
New features in zsh version 3.1.7
---------------------------------
Further enhancements to new completion system:
 - Comprehensive context-sensitive configuration via `styles', which
   can be set by the menu-driven front end in compinstall
 - General mechanism for setting patterns to be ignored in a completion;
   overriding  of patterns to be matched for functions
 - New completers: _prefix to complete word before cursor, _ignored
   to complete using words so far ignored (like $fignore but more
   powerful), _history to complete words from shell history
 - Multiple use of completers with different options, similarly splitting
   of different types of completion (`tags') so they are considered with
   different styles
 - Many more supplied completions for standard commands which work out of
   the box, and better handling of command line options/arguments which
   behave in the usual way   
 - $fpath now set up to use installed functions by default; functions
   can be loaded just by `autoload -U compinit; compinit'
 - Much improved handling of nested quoting
 - New LIST_PACKED and LIST_ROWS_FIRST completion options and corresponding
   styles
 - compctl library separated out (frozen but still supported)
 - User-friendly introduction available at zsh website
   http://sunsite.auc.dk/zsh/

Additions to complist listing library (coloured completion and menu
selection):
 - Listings can be shown page by page (are by default for new completion)
 - Menu selection allows full up and down scrolling of long lists

Other editing features:
 - new parameters $PENDING, $MARK, $BUFFERLINES
 - Easy display of a prompt from within an editing widget

Code parsing, storing and execution:
 - Completely new system of storing code internally, greatly optimised
 - Much less memory for shell functions etc.
 - Can compile shell functions to .zwc `wordcode' functions for fast
   loading
 - Can create `digest' files of entire directories in .zwc format

Parameters:
 - Floating point support added, similar to ksh93, `typeset -F' and
   `typeset -E' declare floating point variables; usual C/Fortran-like
   rules for integer/float conversion
 - Mathematical library zsh/mathfunc contains all the standard mathematical
   functions for use in arithmetical expressions
 - Improved parsing of arithmetical expressions and better error messages
 - Special parameters can be made local
 - `typeset -h' hides specialness of parameters, either as parameter
   attribute or when declaring new local variable
 - Local parameters can now be exported as in other shells; new option
   GLOBAL_EXPORTS on by default provides old behaviour that `typeset -x'
   referred to global parameters.
 - zsh/parameter module enhanced: now needed for new completion; parameters
   provided have `-h' flag set so that they are hidden by `typeset', so
   that existing functions don't need to be changed
 - Quotes can be stripped from parameter values with ${(Q)...}, providing
   reverse of ${(q...)...} facility

Globbing and pattern matching:
 - Pattern matching rewritten for efficiency
 - Supports `backreferences', i.e. extracting parenthesised chunks of
   matches, e.g.
     [[ $foo = (#b)(*/)[^/]* ]]
   stores the part of $foo up to the last / in $match[1] and the indexes of
   the match in $mbegin[1], $mend[1].  (#m) is also available to set $MATCH
   to the entire match and corresponding $MBEGIN, $MEND:  useful in
   parameter substitutions like ${.../.../...}.
 - (#s) and (#e) match start and end of pattern like ^ and $ in regular
   expression, useful in complex expressions such as ((#s)|/)dirname((#e)|/)
   and in parameter expressions.

 - Depth-first/last listing of recursive glob lists

Functions etc.:
 - `autoload -X' inside a function body instructs the shell to
   bootstrap the function at that point
 - `autoload +X fn' says load the function fn but don't execute it
 - Prompt `themes' make customization of prompts easier

Modules:
 - New hierarchical naming scheme for modules; supplied modules go into
   zsh subdirectory, so zle becomes zsh/zle etc.; aliases supplied for
   compatibility for existing code, but the new format should be used in
   future.
 - zmodload is more consistent between dynamically and statically linked
   shells
 - zsh/zftp and its function suite support multiple sessions (zfsession
   command); zftransfer allows transfer of files between two ftp sessions
   with no local file; use styles for e.g. progress style; IPv6 supported;
   recursive put `zfput -r' for uploads
 - zsh/zpty module creates pseudoterminal and allows builtin `expect'-like
   behaviour

Other:
 - Test suite, not yet complete (`make test')
 - use of Linux task limits
 - Many fixes including output redirection with `setopt xtrace' and
   other redirection fixes; NIS+ problem.
 - Better null-command behaviour in sh and csh emulation
 - Internal memory usage optimisations

New features in zsh version 3.1.6 (beta version)
------------------------------------------------
Note also the changes for 3.0.6, which include changes between 3.1.5. and
3.1.6.

New completion system via shell functions; massive degree of
programmability and configurability:
 - ready-made function suite to use, see zshcompsys(1)
 - approximate completion and spelling correction via completion
 - control over matching for case-independence, partial word completion, etc.
 - menu selection:  choose a completion by moving the cursor
 - coloured completion lists
 - completion of filenames in quotes is now more reliable; splitting
   quoted strings into command arguments is also possible.

Other editing changes:
  - enhancements to function/editing interface:  new parameters, numeric
    arguments, string argument passing, reading keys from widgets.
  - the old history-search-{back,for}ward behaviour and bindings have
    returned (up to minor details).
  - BASH_AUTO_LIST option to show completion list only on second key press.
  - the ZBEEP parameter gives a string to output instead of beeping,
    allowing you to have a visual bell.

History changes: new options HIST_NO_FUNCTIONS, HIST_EXPIRE_DUPS_FIRST,
HIST_FIND_NO_DUPS, HIST_IGNORE_ALL_DUPS, INC_APPEND_HISTORY,
HIST_SAVE_NO_DUPS, SHARE_HISTORY, allow better control of when history is
read and written and how duplicates are handled.  New format for history
saves.

Associative arrays plus enhanced parameter substitutions to retrieve keys
and values.

Globbing changes:
  - Case-insensitive and approximate globbing.
  - Ordering and indexing of globbing matches, e.g. *(om[1]) picks
    most recently modified file.
  - General file mode qualifier with chmod(1)-like syntax, e.g. *(f:u+wx:)

New loadable modules:
  - zftp, plus associated function suite, for turning your zsh session
    into an FTP session too
  - parameter, for examining and altering shell hash tables via an
    associative array interface.
  - mapfile, for reading and writing external files via an associative
    array interface.

Debugging and prompt enhancements:
  - $PS4 can contain %i for $LINENO as well as %N for script or function
    names (default PS4 changed), also %_ for current shell structure
    executing;
  - Prompt truncation %<...< is now more flexible: it applies to a
    whole section of the prompt, not just one escape.  You need to put
    %<< after the truncated escape to get the old behaviour.
  - %20(l.yes.no) in prompts prints yes if at least 20 characters have
    been output, else no (e.g. for outputting extra newlines).

Parameter and expansion changes
  - `typeset -t MYPATH mypath' creates tied path/PATH-like variables
  - `typeset -g' allows operations on parameters without making them local
  - New expansions
    - ${(t)param} prints type information for $param
    - ${(P)param} treats value of $param as the name of a param to
      substitute
    - ${foo:q} can quote replaced parameter text from expansion
    - ${foo/old/new} substitution, like bash; also (S) flag for shortest
      match
    - $foo[(b.2.i)bar] starts searching $foo for bar starting at 2nd match

Builtin and function changes
  - stat module: `stat -H hash foo' gives you e.g. $hash[mtime]
  - `autoload -U' autoloads functions without alias expansion.

Other new options:
  - LOCAL_TRAPS allows signal traps to be local to functions (as in ksh).
  - NO_RCS can now be turned on at any point in initialization files.
  - NO_GLOBAL_RCS can force /etc/z* files after /etc/zshenv to be skipped.
    (Please don't use this as an excuse to stuff more into /etc/zshenv!)
  - Existing MAGIC_EQUAL_SUBST option is more useful; any argument containing
    ...=~...:~... will perform filename expansion on the ~ (previously,
    the string before `=' had to look like a parameter name).

Configuration changes:
  - Generation of signal names should be more reliable
  - Customizable installation of shell functions from distribution.

New features in zsh version 3.0.6
---------------------------------

Most of these changes are designed to improve compatibility with zsh
version 3.1.6, the latest development release.  However, this release also
fixes all known Year 2000 (Y2K) bugs in zsh 3.0.

History changes:
  - whitespace between words is ignored in history searches.
  - new option HIST_REDUCE_BLANKS removes extra whitespace in the stored
    history.
  - support for reading (but not writing) version 3.1.6 history files.

Globbing changes:
  - the a, c, and m glob qualifiers can now test time in seconds.
  - globbing of number ranges behaves more like character ranges in that
    it can match a prefix of a number, e.g. `<1-5>*' matches 1, 2, 3, 4,
    5, 17, 23skiddoo, 5986, etc., but not 6, 7, 8ball, 911, etc.

Parameter and expansion changes:
  - expansion of ~ and other globbing flags via ${~param} do not depend
    upon EXTENDED_GLOB (bug fix).
  - nested parameter substitutions require braces (this was always the
    documented behavior, but previous parsers didn't enforce it).
  - quote only nested expansion, e.g. ${(f)"$(<file)"} reads complete
    `file', then splits lines into array.

Builtin and function changes:
  - `typeset -U' works on the colon-array version of linked parameters.
  - `typeset +f' and `functions +' output the names (only) of functions.
  - `emulate -L' has the effect of `setopt localoptions'.
  - in fn1() { local foo; unset foo; foo=bar; }, foo is restored at local
    level, whereas if the `unset foo' appeared in a nested function it
    would have been restored at global level, which was presumably wrong.
  - `foo=bar >&file' is a redirection, not a NULLCMD.
  - any single complex command, such as `case ... esac', parses as if
    semicolon-terminated (bug fix).
  - the shell function `preexec', if defined, is run after parsing each
    command line but before executing the command.

Other changes:
  - the option PRINT_EIGHT_BIT causes zsh to emit raw bytes in prompts
    and completion lists even if the system ctype(3) package says that
    those bytes are not "printable."

Debugging enhancements:
  - LINENO is now very much more useful in scripts and functions and is
    reported correctly in most error messages.
  - ERREXIT behavior is now consistent with newer Bourne-like shells,
    e.g. with respect to `if' tests that fail.

Configuration changes:
  - Large file and 64-bit integers on 32-bit machines supported where
    provided by OS.
  - a few more system features, such as getpwnam/getpwuid, are tested for.


New features in zsh version 3.1 (beta version)
----------------------------------------------

On most operating systems zsh can load binary modules dynamically at
run-time.  ZLE and the compctl builtin are now reside in a separate
module which is loaded automatically on demand.

for ((expr; expr; expr)) do ... done loop syntax from AT&T ksh93 is
now supported.

POSIX globbing character classes ([:alnum:] etc.) are now supported.

ksh's case fall-through feature (;&) is supported.

ksh93's $'' quoting syntax is supported.

Restricted mode is now supported.  This is controlled by the new option
RESTRICTED (-r).

New options BARE_GLOB_QUAL, HIST_NO_FUNCTIONS (alias NO_LOG), KSH_GLOB,
PRINT_EIGHT_BIT, PROMPT_BANG, PROMPT_PERCENT, RM_STAR_WAIT.

Options ALWAYS_LAST_PROMPT, APPEND_HISTORY, AUTO_LIST, AUTO_MENU,
AUTO_PARAM_KEYS, AUTO_PARAM_SLASH, AUTO_REMOVE_SLASH, LIST_AMBIGUOUS
and LIST_TYPES are now on by default.

In ZLE, arbitrarily many keymaps can be defined.  Multi-character
keybindings now work.

Completion can be performed within a brace expansion.

EMACS-like universal-argument function.


New features in zsh version 3.0
-------------------------------

Trailing "/" in a glob pattern now works like in other shell thus it
can no longer be used as a shorthand for "(/)".

Much improved sh/ksh emulation.  When zsh is invoked as sh it mostly
conforms to POSIX 1003.2.

Enhanced parameter expansion features: new flags: A, @, e, W, p, f, F.
Expansions can be nested.  For example,
"${${(M)${(f@)$(<builtin.pro)}:#char*}[2][(w)3]}" expands to the third
word of the second line of builtin.pro which begins with char.  See
zshexpn(1) for the details.

***/foo glob does recursive directory search following symbolic links.

Traps defined by the trap builtin are now executed in the current shell
environment and not as a shell function.  This means that $1 is not set
to the signal number.  Of course the TRAPxxx functions continue working
as before.

Traps defined by the trap builtin are reset to their default values in
subshells.

Option names can be prefixed by `no' to unset an option.
setopt no_option_name is the same as unsetopt option_name.
This change affects the output of the setopt and unsetopt
builtins when these are invoked without arguments.  See
the zshoptions manual page for more explanation.

!, {, } and [[ are now reserved words.  Things like [[-z $foo]] or {foo}
should not be used.  {foo} still works if the IGNORE_BRACES option is not
set but this feature may be removed in the future.  [[ -z $foo ]] and
{ foo } should be used instead.

HOSTTYPE special parameter is removed.  The new OSTYPE, MACHTYPE and
VENDOR parameters should be used instead.

VERSION parameter is renamed to ZSH_VERSION

exec now saves the history in interactive shells.  If you do not like this
behaviour you can alias exec to 'unset HISTFILE ; exec'.

${~spec}, ${=spec} and ${^spec} used to toggle the effect of
globsubst/shwordsplit/rcexpandparam.  Now these force the corresponding
option on. ~, = or ^ can be doubled to force the relevant option off for
the substitution.

Explicitly requested word splitting like ${=spec} or ${(s:delim:)spec}
will be executed even if the substitution is double quoted.

The right-hand side of assignments are no longer globbed by default hence
assignment foo=* will assign '*' as a value of foo.  Use the foo=( * )
array assignment syntax to get the old behaviour.  Alternatively the
GLOB_ASSIGN can be set to emulate the old behaviour but the usage of this
option is strongly discouraged and this option may be completely removed in
the future.

foo=$bar no longer creates an array even if bar is an array.  Use
foo=( $bar ) or even better, foo=( "$bar[@]" ) instead.

When foo is an array parameter ${#foo} will always return the length of the
array even if the substitution is double quoted.  ${(c)#foo} should be used
to get back the old behaviour.

When the prompt_subst option is set prompts are fully expanded using
parameter expansion, command substitution and arithmetic expansion.
In 2.5 backquote substitution was not performed in the prompts so this
change might cause problems in some startup scripts if ` is used literally
in prompts.

History substitution is now not performed if the history escape character
appears in a single-quoted string.  This may break some interactive shell
functions which use \! in single-quoted strings.

The UID, EUID, GID, EGID parameters can be assigned now. The assignment
executes the setuid(), seteuid(), setgid(), setegid() respectively.  On
systems where setuid and seteuid is not supported these functions are
emulated using setreuid or setresuid which may result in a different
behaviour.

Assigning the USERNAME parameter will call setuid(uid) where uid is the
user id of the specified user.

The privileged (-p) option is automatically set on invocation if euid != uid
or egid != gid.  If this option is set no user startup files are sourced.
The shell will drop privileges when this option is unset by resetting its
euid to uid and its egid to gid.

The =number substitution for accessing the directory stack is changed to
~number to allow =command substitution when a command name begins with a 
digit.

<> is a redirection operator which opens the standard input for both
reading and writing.  To match a number use <->.

Option letters -1 and -C for PRINT_EXIT_VALUE and NO_CLOBBER are swapped:
`set -C' sets NO_CLOBBER and `set -1' sets PRINT_EXIT_VALUE.

AUTO_PUSHD behaviour is changed.  Now cd without arguments will always go
to the $HOME directory even if AUTO_PUSHD is set and PUSHD_TO_HOME is not
set.  If you preferred the old behaviour you can alias cd to pushd.

IFS word splitting with SH_WORD_SPLIT and the splitting of the input in the
read builtin has changed in cases when IFS contains characters other than
<space>, <tab>, <newline>.  See the description of IFS in the zshparam
manual page for more details.


New features in zsh version 2.5
-------------------------------

Greatly expanded completion possibilities.  Programmable completion
allows detailed control over what arguments of what commands can be
completed to what.  See dots/zcomp in the distribution for examples.

Expand filenames with ~ and = on the right hand side of parameter
assignments.  New option MAGIC_EQUAL_SUBST to do it in all
identifier=expression arguments.

${+name} becomes 1 or 0 if name is set or unset.  ${~spec} toggles
GLOB_SUBST in substitution.  Parameter substitution takes lots
of flags in the format ${(flags)name}.

New glob qualifiers for block/character special files, times in glob
qualifiers can be in months, weeks, days, hours, minutes.  Qualifiers can
work on links or on what they point to.  Qualifiers separated by commas
are or-ed.

New parameter substitution modifiers (fFwW) to repeat actions.  New
option CSH_JUNKIE_HISTORY.

New line editor functions history-beginning-search-backward,
history-beginning-search-forward, expand-or-complete-prefix, push-input,
push-line-or-edit.

Assign to part of a string, use qualifiers on string subscription with
$foo[(qual)2,5]

New parameters: EGID, EUID, KEYTIMEOUT

New prompt escape sequence %_ to get constructs like for and while in
the secondary prompt.  %E in prompt clears to end of screen.

Conditional expressions in PROMPT and WATCHFMT.

New options ALWAYS_LAST_PROMPT, ALWAYS_TO_END, AUTO_PARAM_KEYS,
COMPLETE_ALIASES, COMPLETE_IN_WORD, CSH_JUNKIE_HISTORY, GLOB_SUBST,
LIST_AMBIGUOUS, MAGIC_EQUAL_SUBST, NO_FLOW_CONTROL, PROMPT_SUBST

New option -m to many builtins makes arguments subject to pattern
matching.

Bindkey can now bind both key sequences and prefixes of those.  You can
for example bind ESC and function keys sending ESC sequences.

Additional options to read builtin to use in functions called by
completion.

New options to print to sort arguments and print them in columns.

Some additional resource limits can be specified.

Some editor functions now work in the minibuffer.