Elvish 0.21.0 has been released on 2024-08-14, six months after 0.20.0, bringing new features and bugfixes.
As usual, prebuilt binaries are offered for most common platforms.
Notable new features
-
A new
withcommand for running a lambda with temporary assignments. -
A new
keep-ifcommand. -
The
osmodule has gained the following new commands:mkdir-all,symlinkandrename. -
A new
render-styledowncommand. -
A new
str:repeatcommand. -
A new
mdmodule, currently containing a single functionmd:showfor rendering Markdown in the terminal. -
On Unix, Elvish now turns off output flow control (IXON) by default, freeing up Ctrl-S and Ctrl-Q for keybindings.
Users who require this feature can turn it back on by running
stty ixon.
Notable bugfixes
-
The string comparison commands
<s,<=s,==s,>sand>=s(but not!=s) now accept any number of arguments, as they are documented to do. -
Temporary assignments now work correctly on map and list elements (#1515).
-
The terminal line editor is now more aggressive in suppressing compilation errors caused by the code not being complete.
For example, during the process of typing out
echo $pid, the editor no longer complains that$pis undefined when the user has typedecho $p.
Deprecations
-
The implicit cd feature is now deprecated. Use
cdor location mode instead.
Breaking changes
-
The
eawkcommand, deprecated since 0.20.0, has been removed. Usere:awkinstead. -
Support for the legacy
~/.elvishdirectory, deprecated since 0.16.0, has been removed. For the supported directory paths, see documentation for the Elvish command. -
Support for the legacy temporary assignment syntax (
a=b command), deprecated since 0.18.0, has been removed.Use either the
tmpcommand (available since 0.18.0) or thewithcommand (available since this release) instead. -
The commands
!=,!=sandnot-eqnow only accepts two arguments (#1767). -
The commands
edit:kill-left-alnum-wordandedit:kill-right-alnum-wordhave been renamed toedit:kill-alnum-word-leftandedit:kill-alnum-word-right, to be consistent with the documentation and the names of other similar commands.If you need to write code that supports both names, use
has-keyto detect which name is available:fn kill-alnum-word-left { if (has-key edit: kill-alnum-word-left~) { edit:kill-alnum-word-left } else { edit:kill-left-alnum-word } } -
Using
elsewithoutcatchin thetryspecial command is no longer supported. The commandtry { a } else { b } finally { c }is equivalent to justtry { a; b } finally { c }.