Version 0.16.0 has been released on 2021-08-21, 6 months after 0.15.0, bringing many new features and bugfixes.
As usual, prebuilt binaries are offered for most common platforms.
Note: Versions 0.16.1, 0.16.2 and 0.16.3 were released to fix some packaging issues. They are otherwise identical to 0.16.0.
Breaking changes
-
Exceptions caused by a command trying to write to a closed pipe are now suppressed if the command is part of a pipeline and not the last command of the pipeline.
-
The
builtin:namespace, useful for referring to builtin variables and commands explicitly, now requiresuse builtinbefore use, consistent with other standard library modules. -
As a side effect of support for a integer numbers, contexts that require integers no longer accept floating point numbers with a zero fraction part (e.g.
$li[1.0]is now illegal;$li[1]is required). -
The following commands are now replaced by
edit:close-mode:edit:close-listing,edit:completion:close,edit:history:close,edit:listing:close. -
The
edit:histlist:toggle-case-sensitivitycommand has been removed. Instead, the history listing mode now applies smart-case matching by default. -
Declaring a variable with a
~suffix, without an explicit initial value, now initializes its value to the builtinnopfunction rather than$nil(#1248).
Deprecated features
Deprecated features will be removed in 0.17.0.
The following deprecated features trigger a warning whenever the code is parsed or compiled, even if it is not executed:
-
The
fopenandfclosecommands are deprecated. Usefile:openandfile:closeinstead. -
The
prcloseandpwclosecommands are deprecated. Usefile:closeinstead.
The following deprecated features unfortunately doesn’t trigger any warnings:
-
The
math:pow10command is deprecated. Usemath:pow 10 $exponentinstead.
Notable bugfixes
-
Iterating over certain list slices no longer crash Elvish (#1287).
-
Globbing no longer crashes when there are files whose names contain invalid UTF-8 sequences (#1220).
-
The
path:is-dirandpath:is-regularcommands default behavior no longer follows a final symlink as advertised in the original documentation. A&follow-symlinkoption has been added to get the old, undocumented, behavior since it can be useful and avoids the need to usepath:eval-symlinksto transform the path in common use cases.
-
Evaluating
~usernameno longer appends a slash (#1246).
Notable new features
New features in the language:
-
Elvish’s number type has been extended with support for arbitrary-precision integers and rationals. Many numerical commands in the builtin module and the
math:module have been extended with support for them. -
Experimental support for importing modules written in Go with
use.
New features in the standard library:
-
A new
file:module contains utilities for manipulating files. -
Commands for creating temporary files and directories,
path:temp-fileandpath:temp-dir(#1255). -
New options to the
edit:command-historycommand:&dedup,&newest-first, and&cmd-only(#1053). -
New
from-terminatedandto-terminatedcommands to allow efficient streaming of byte sequences terminated by ASCII NUL or any other terminator (#1070).
New features in the interactive editor:
-
The editor now supports setting global bindings via
$edit:global-binding. Global bindings are consulted for keys not present in mode-specific bindings. -
A new
edit:clearbuiltin to clear the screen has been added. -
The editor now uses a DSL for filtering items in completion, history listing, location and navigation modes.
-
A new
edit:after-commandhook that is invoked after each interactive command line is run (#1029). -
A new
edit:command-durationvariable that is the number of seconds to execute the most recent interactive command line (#1029).
New features in the command behavior:
-
Elvish now follows the XDG directory spec for placing the database and searching for
rc.elvand libraries (#383). The legacy directory~/.elvishis still respected for now, but may issue deprecation warnings in a future version. The exact paths are documented in the page for the Elvish command.