Version 0.14.0 has been released on 2020-07-05, 6 months after 0.13, bringing many new features and bugfixes.
As usual, prebuilt binaries are offered for most common platforms.
Breaking changes
-
The
typefield of the value written bysrchave been removed. -
The
allcommand no longer preserves byte inputs as is; instead it turns them into values, one each line. It also accepts an optional list argument, consistent with other value-taking commands. -
Output captures now strip trailing carriage returns from each line, effectively making
\r\naccepted as a line separator (#970). -
Map-like values written by the
dir-historyandre:findfunctions can no longer be assoc’ed.
Deprecated features
Elvish now has a deprecation mechanism to give advance notice for breaking changes. Deprecated features trigger warnings, and will be removed in the next release.
The following deprecated features trigger a warning whenever the code is parsed or compiled, even if it is not executed:
-
The
explodecommand is now deprecated. Useallinstead. -
The
joins,replacesandsplitscommands are now deprecated. Usestr:join,str:replaceandstr:splitinstead. -
The
^command is now deprecated. Usemath:powinstead. -
The
-timecommand has been promoted totime. The-timecommand is now a deprecated alias fortime. -
Using
\for line continuation is now deprecated. Use^instead.
The following deprecated features trigger a warning when the code is evaluated:
-
The
&display-suffixoption of theedit:complex-candidateis now deprecated. Use the&displayoption instead.
The following deprecated features, unfortunately, do not trigger any warnings:
-
The
pathfield of the value returned bysrcis now deprecated. Use thenamefield instead.
Notable new features
New features in the language:
-
Exceptions can now be introspected by accessing their fields (#208).
-
Two new wildcard modifiers,
type:dirandtype:regularare added, which restricts the wildcard pattern to only match directories or regular files, respectively. -
The printing of floating-point numbers has been tweaked to feel much more natural (#811).
-
Scripts may now use relative
useto import modules outside~/.elvish/lib. -
Dynamic strings may now be used as command as long as they contain slashes (#764).
-
Elvish now supports CRLF line endings in source files (#918).
-
Comments are now allowed anywhere newlines serve as separators, notably inside list and map literals (#924).
-
The
^character can now be used for line continuation.
New features in the standard library:
-
A new
ordercommand for sorting values has been introduced #651. -
A new
platform:module has been introduced. -
A new
unix:module has been introduced. -
A new
math:module has been introduced. -
The
failcommand now takes an argument of any type. In particular, if the argument is an exception, it rethrows the exception (#941). -
A new
showcommand has been added, which is currently useful for printing the stack trace of an exception to the terminal. -
A new
make-mapcommand creates a map from a sequence of pairs (#943). -
A new
read-linecommand can be used to read a single line from the byte input (#975). -
The
-timecommand has been promoted totime, and it now accepts an&on-endcallback to specify how to save the duration of the execution (#295). -
A new
onecommand has been added. -
A new
read-uptocommand can now be added to read byte inputs up to a delimiter (#831).
New features in the interactive editor:
-
When a callback of the interactive editor throws an exception, the exception is now saved in a
$edit:exceptionsvariable for closer examination (#945). -
A new alternative abbreviation mechanism, “small word abbreviation”, is now available and configurable via
$edit:small-word-abbr. -
The ratios of the column widths in navigation mode can now be configured with
$edit:navigation:width-ratio(#464) -
A new
$edit:add-cmd-filtersvariable is now available for controlling whether a command is added to the history.The default value of this variable filters out commands that start with a space.
-
The
edit:complex-candidatenow supports a&displayoption to specify the full display text.
Other improvements:
-
Elvish now uses
$XDG_RUNTIME_DIRto keep runtime files if possible. -
Elvish now increments the
$SHLVLenvironment variable (#834).
Notable bugfixes
-
Invalid option names or values passed to builtin functions now correctly trigger an exception, instead of being silently ignored (#958).
-
Elvish no longer crashes when redirecting to a high FD (#788).
-
Indexing access to nonexistent variables now correctly triggers a compilation error (#889).
-
The interactive REPL no longer highlights complex commands as red (#881).
-
Glob patterns after
~usernamenow evaluate correctly (#793). -
On Windows, tab completions for directories no longer add superfluous quotes backslashes (#897).
-
The
edit:move-dot-left-small-wordcommand has been fixed to actually move by a small word instead of a word.