Releases: elves/elvish
0.21.0
0.20.1
v0.20.0
v0.19.2
The tagging of 0.19.1 was also not done correctly - the code would still advertise it as 0.19.0 when built. To fix this I tagged 0.19.2 with the correct version information.
0.19.[012] all have the same functionalities, and packagers are advised to package 0.19.2 only. Sorry for the confusion.
v0.19.1
Note: The 0.19.0 version was tagged prematurely by mistake, but it has been picked up by some package managers. As a result, the 0.19.0 version is considered to be "skipped" officially. If your package manager provides a 0.19.0 version, it is probably identical to 0.19.1 in functionalities.
Packagers who have already packaged 0.19.0 are still advised to "upgrade" to 0.19.1.
See release notes in https://elv.sh/blog/0.19.1-release-notes.html
v0.18.0
v0.8
This is another pre-release, for no particular reason other than lack of pre-releases for a long time.
As always, binaries are on https://dl.elvish.io.
Breaking changes
-
The
unpack
builtin is now known asexplode
, for more excitement. -
Mode-specific editor commands now reside in mode-specific subnamespaces of
le:
(they used to be all directly underle:
). For instance, navigation-related builtins are now to be found inle:nav:
. For example,le:nav-left
has becomele:nav:left
.Names of most builtins undergo a simple mechanical transformation like in the example. Notable exceptions are:
-
le:start-xxx
builtins that are nowle:xxx:start
. -
le:navigation-default
is nowle:nav:default
, in consistency with other navigation-mode commands. -
Commands like
le:move-dot-left
are still in thele:
namespace; they are not considered to be insert-mode-specific.
-
Notable fixes and enhancements
-
Test coverage has increased to almost 50%.
-
The
edit
package has seen some cleanups and refactors. -
It is now possible to pin and hide directories in location mode, using
$le:loc-pinned
and$le:loc-hidden
respectively (#326 #342). -
Matching in location mode is now more sensible (#338).
-
Special builtins
and
andor
have been added, with similar semantics as Python.~> and $true $false ▶ $false ~> and $false ?(echo 233) ▶ $false ~> and $true 1 ▶ 1
-
A
not
builtin has been added that negates boolean values. -
Pressing
Ctrl-V
will now put Elvish into "raw mode" that causes the next key press to be read literally, like in other shells (#182). However, the implementation is now buggy (#350). -
An
embedded:readline-binding
module has been added. Adduse embedded:readline-binding
to get a (partial) readline-esque binding (#339). -
An experimental
-match
builtin for regular expression matching was added. -
A
repr
builtin for printing the representation of objects has been added. -
Elvish per-se no longer depends on cgo for compiling (#345). However, Elvish still uses sqlite, which requires cgo to compile.
-
When completing a variable in a namespace, e.g.
put $le:lo<Tab>
, the candidate menu now only shows the variable names (likeloc-pinned
) instead of the whole qualified name (like$le:loc-pinned
). Under the hood, the definition of what is being matched against candidates, as well as the candidates themselves, have changed. When using the default prefix matcher, this has only consequence on how candidates are displayed. However, for other matchers this will make a difference. -
An experimental variable
$le:-use-subseq-matcher
has been introduced. If it is set to$true
, Elvish matches completion candidates using a subsequence matching algorithm. Using the example in the previous bullet, input $le:lo<Tab>
,lo
is used to match againstloc-pinned
instead of the entire$le:lo
, becauseloc-pinned
instead of$le:loc-pinned
is now considered the candidate.
v0.7
As always, binaries are on dl.elvish.io.
Breaking changes
Almost all the breaking changes are about control structures. If you have scripts written for 0.6 or earlier, you can use fix-for-0.7 to upgrade your scripts automatically.
-
Control structures used to mimic POSIX shell, but now use curly braces in a Go-like style:
if (eq a a) { echo foo } else { echo bar }
Note that in the above code, the opening brace
{
must:-
Appear on the same line with
if
. Otherwise it will be considered to be another command, and elvish will complain thatif
does not have enough arguments. -
Have a space before it. Otherwise it will be parsed as brace expansion (as in
echo {a,b}{c,d}
) instead.
The newline after
{
can be substituted by a space, so you can write these in one line if you must:if (eq a a) { echo foo } else { echo bar }
-
-
There used to be a special "boolean return value" for functions like
==
oreq
to indicate whether it has succeeded or failed, indicated by � when failure happens. Now they simply output a boolean value$true
or$false
(#319).The
?(...)
operator used to capture the aforementioned "boolean return value". Use the output capture operator(...)
instead. The?(...)
operator has been repurposed to capture exceptions. -
The
if
andwhile
control structures now take values instead of pipelines (also see #319). Together with 1 and 2, this codeif == $x 1; then echo 1 else echo 2 fi
should now be written as
if (== $x 1) { echo 1 } else { echo 2 }
-
The
for
control structure has been changed to operate on one iterable value, instead of a bunch of values. Thein
keyword is nolonger needed. For example, this codefor x in lorem ipsum; do echo $x done
should now be written as
for x [lorem ipsum] { echo $x }
-
The
try
control structure is only changed syntactically. This piece of code:try do-dangerous-stuff except e put $e else echo all well finally echo finally tried
is now written as:
try { do-dangerous-stuff } except e { put $e } except { echo all well } finally { echo finally }
Notable enhancements
A but:
glob qualifier has been introduced to exclude results from globbing. For instance, to remove all files in the current directory except parse
, do:
rm -r *[but:parse]
The qualifier only accepts literal file names for now.
v0.6
As always, binaries are found on dl.elvish.io.
Breaking changes
- The
use
builtin now looks for modules under~/.elvish/lib
instead of~/.elvish
. - In navigation mode (^N) and history listing mode (^R), Enter now inserts the selected item and exit the mode. To insert without exiting, use Alt-Enter (#306).
Notable enhancements
(Experimental features will change before 1.0. All other features might change before 1.0.)
- An experimental
-ifaddr
builtin outputs the IP addresses of this host, along with the network prefix length. - Two new builtins,
{has,search}-external
have been added. The former is a predicate and the latter outputs the searching result and errors when the external cannot be found. - The
le:styled
builtin now accepts textual styles likegreen
andbg-red
(#301). For instance, this writeshaha
with green font and red background:echo (le:styled haha 'green;bg-red')
. - History listing can be filtered case-insensitively by pressing ^G.
- Exception backtrack has been improved. When multiple commands in a pipeline throw exceptions, the backtrack is shown as a tree. Try
fn f { fail f }; f | f
. - Character sets, ranges and classes are now supported in wildcards (#298).
- A new spacey syntax for assignments has been introduced (#294).
- Tab-completion now works for redirs (try
ls >
and Tab) and some indices (tryecho $le:bindg[
and Tab).
v0.5
Breaking changes
- The
println
builtin is now known asecho
, shadowing the externalecho
. - Changes on comparison builtins:
- A family of string comparison builtins have been added,
<s
,<=s
,==s
,!=s
,>s
and>=s
(#238). - The
is
builtin is the new generic (shallow) equality predicate. The deep equality predicatedeepeq
is now known simply aseq
. - The
==
builtin now compares numbers --== 1 1.0
is true, while== a a
throws an exception. To compare strings, use either==s
oris
.
- A family of string comparison builtins have been added,
- Automatic
use
'ing has been removed. All modules must beuse
d before use. - The
into-lines
builtin is now known asto-lines
. - The
history
builtin has been removed; use$le:history
instead (#267).
Other notable changes
- When run interactively, predicates that return false are now indicated with a ✗ sign.
- Completion listing now has black text over a light background (#184), and is no longer unnecessarily tall (https://asciinema.org/a/87937).
- Strings can now be indexed to obtain substrings (#243).
- The
peach
command, a parallel version ofeach
has been added (#244). - Multi-level modules are supported. For instance, the
a:b
module is the file~/.elvish/a/b.elv
(#249). - When exceptions are thrown, a full stack trace is now displayed (#207, https://asciinema.org/a/88801).
- An unstable builtin
-time
has been added that shows the time to run a function. - An unstable builtin
-override-wcwidth
has been added to override wcwidth. - The navigation mode now supports previewing UTF-8-encoded text files (https://asciinema.org/a/89374).
- A variable
$le:after-readline
has been added. It is a list of functions to be called just after the line editor completes reading input, with the input as the sole argument. - The auxiliary
elvish-stub
program has been removed, and elvish now always runs in foreground. As a nice side effect, elvish is go-gettable again.