Version 0.15.0 has been released on 2021-01-30, 6 months after 0.14.0, bringing many new features and bugfixes.
As usual, prebuilt binaries are offered for most common platforms.
Breaking changes
-
Builtin functions and subnamespaces of
edit:are now read-only. -
Introspection for rest arguments has changed:
-
The rest argument is now contained in the
arg-namesfield of a closure. -
The
rest-argfield now contains the index of the rest argument, instead of the name.
-
-
The
-sourcecommand now runs in a temporary namespace and can no longer affect the local scope of its caller. -
Key modifiers are no longer case insensitive. For example,
Altis still recognized butaltis not. This makes key modifier parsing consistent with key names. See #1163.
Deprecated features
Deprecated features will be removed in 0.16.0.
The following deprecated features trigger a warning whenever the code is parsed or compiled, even if it is not executed:
-
Using the syntax of temporary assignment (
var=value) for non-temporary assignment is now deprecated. The syntax is still valid for temporary assignment. For example, usingfoo=baras a standalone command is deprecated, but using it as part of command, likefoo=bar ls, is not deprecated. -
The
chrcommand is now deprecated. Usestr:from-codepointsinstead. -
The
ordcommand is now deprecated. Usestr:to-codepointsinstead. -
The
has-prefixcommand is now deprecated. Usestr:has-prefixinstead. -
The
has-suffixcommand is now deprecated. Usestr:has-suffixinstead. -
The
-sourcecommand is now deprecated. Useevalinstead. -
The undocumented
esleepcommand is now deprecated. Usesleepinstead. -
The
eval-symlinkscommand is deprecated. Usepath:eval-symlinksinstead. -
The
path-abscommand is deprecated. Usepath:absinstead. -
The
path-basecommand is deprecated. Usepath:baseinstead. -
The
path-cleancommand is deprecated. Usepath:cleaninstead. -
The
path-dircommand is deprecated. Usepath:dirinstead. -
The
path-extcommand is deprecated. Usepath:extinstead. -
The
-is-dircommand is deprecated. Usepath:is-dirinstead.
The following deprecated features trigger a warning when the code is evaluated:
-
Using
:in slice indices is deprecated. Use..instead. -
The mechanism of assigning to
$-exports-inrc.elvto export variables to the REPL namespace is deprecated. Useedit:add-varsinstead.
Notable new features
New features in the language:
-
A new
varspecial command can be used to explicitly declare variables, and optionally assign them initial values. -
A new
setspecial command can be used to set the values of variables or elements. -
Slice indices can now use
..for left-closed, right-open ranges, and..=for closed ranges. -
Rest variables and rest arguments are no longer restricted to the last variable.
-
Variables containing any character can now be assigned and used by quoting their name, for example
'name!' = foo; put $'name!'.
New features in the standard library:
-
A new
evalcommand supports evaluating a dynamic piece of code in a restricted namespace. -
A new
sleepcommand. -
A new
path:module has been introduced for manipulating and testing filesystem paths. -
A new
deprecatecommand.
New features in the interactive editor:
-
The new commands
edit:add-varandedit:add-varsprovide an API for manipulating the REPL’s namespace from anywhere. -
SGR escape sequences written from the prompt callback are now supported.
New features in the main program:
-
When using
-compileonlyto check Elvish sources that contain parse errors, Elvish will still try to compile the source code and print out compilation errors.
Notable bugfixes
-
Using large lists that contain
$nilno longer crashes Elvish.