Version 0.13 has been released on 2020-01-01, 18 months after 0.12, bringing many new features and bugfixes.
As usual, prebuilt binaries are offered for most common platforms.
This release sees a total rewrite of the line editor. As a result, there have been some changes to its API, the
Binding tables no longer support the
defaultkey for overriding the default behavior of modes. All the
edit:<mode>:defaultfunctions have been removed:
edit:listing:backspacefunctions have also been removed. Their functionalities are now baked into the default behavior of the insert and listing modes.
edit:history:listfunction has been removed. Use
edit:lastcmd:accept-linefunction has been removed. Use
edit:-narrow-readfunction and the
edit:narrow:module have been removed. Used
edit:styledfunction has been removed. Used
edit:insert:startfunction has been removed. Use
edit:location:match-dir-patternfunction have been removed. There is no replacement yet; the location matcher is not customizable now, although it may be made customizable again in a future version.
edit:completion:trigger-filterfunction has been removed. The completion mode now always focuses on the filter, and it is no longer possible to focus on the main buffer during completion.
edit:history:listfunction has been removed. There is no replacement yet.
The names of basic colors used in
styledhas changed to be more standard:
lightgraycolor (ANSI code 37) is now called
graycolor (ANSI code 90) is now called
whitecolor (ANSI code 97) is now called
lightX(ANSI codes 90 to 97) colors have been renamed to
Builtin math functions now output values of an explicit
float64number type instead of strings.
Notable fixes and enhancements
The editor now has a minibuffer, bound to Alt-x by default. The minibuffer allows you to execute editor commands without binding them to a key.
The editor now has an experimental “instant mode” that can be activated with
edit:-instant:start. It is not bound by default. The instant mode executes the code on the command line every time it changes.
WARNING: Beware of unintended consequences when using destructive commands. For example, if you type
sudo rm -rf /tmp/*in instant mode, Elvish will attempt to execute
sudo rm -rf /when you typed so far.
styledbuiltin now supports more color spaces:
Colors from the xterm 256-color palette can be specified as
colorN, such as
24-bit RGB colors can be specified as
#RRGGBB, such as
Proper terminal support is required to display those colors.
In redirections, the 3 standard file descriptors may be specified as names (
stderr) instead of numbers, thanks to @jiujieti (PR #869).
Code such as
x = $xwhere
$xhas not been defined now correctly results in a compilation error, thanks to @jiujieti (PR #872).
whilespecial form now supports an
elseclause, thanks to @0x005c (PR #863). This feature was previously documented but missing implementation.
%no longer crashes Elvish when the divisor is 0, thanks to @0x005c (PR #866).
Wildcard patterns of multiple question marks (like
a??) are now parsed correctly (issue #848).
A new floating-point numeric type has been introduced, and can be constructed with the
float64builtin function (issue #816).
$nilvalue has been introduced to represent lack of meaningful values. JSON
nullvalues are converted to Elvish
Two new builtins,
only-valueshave been introduced. They can read a mixture of byte and value inputs and only keep one type and discard the other type.
usespecial form now accepts an optional second argument for renaming the imported module.
chrbuiltin that converts a number to its corresponding Unicode character has been added.
New editor builtin commands
edit:kill-word-righthas been added, thanks to @kwshi (PR #721).