Skip to content

Releases: elves/elvish

0.20.1

14 Feb 14:20
Compare
Choose a tag to compare

v0.20.0

11 Feb 17:54
Compare
Choose a tag to compare

v0.19.2

05 Mar 16:17
Compare
Choose a tag to compare

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

05 Mar 01:12
Compare
Choose a tag to compare
v0.19.1 Pre-release
Pre-release

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

11 Apr 12:46
Compare
Choose a tag to compare

v0.8

23 Sep 00:22
Compare
Choose a tag to compare
v0.8 Pre-release
Pre-release

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 as explode, for more excitement.

  • Mode-specific editor commands now reside in mode-specific subnamespaces of le: (they used to be all directly under le:). For instance, navigation-related builtins are now to be found in le:nav:. For example, le:nav-left has become le:nav:left.

    Names of most builtins undergo a simple mechanical transformation like in the example. Notable exceptions are:

    • le:start-xxx builtins that are now le:xxx:start.

    • le:navigation-default is now le:nav:default, in consistency with other navigation-mode commands.

    • Commands like le:move-dot-left are still in the le: 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 and or 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. Add use 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 (like loc-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, in put $le:lo<Tab>, lo is used to match against loc-pinned instead of the entire $le:lo, because loc-pinned instead of $le:loc-pinned is now considered the candidate.

v0.7

23 Sep 00:22
Compare
Choose a tag to compare
v0.7 Pre-release
Pre-release

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.

  1. 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:

    1. Appear on the same line with if. Otherwise it will be considered to be another command, and elvish will complain that if does not have enough arguments.

    2. 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 }
    
  2. There used to be a special "boolean return value" for functions like == or eq 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.

  3. The if and while control structures now take values instead of pipelines (also see #319). Together with 1 and 2, this code

    if == $x 1; then
        echo 1
    else
        echo 2
    fi
    

    should now be written as

    if (== $x 1) {
        echo 1
    } else {
        echo 2
    }
    
  4. The for control structure has been changed to operate on one iterable value, instead of a bunch of values. The in keyword is nolonger needed. For example, this code

    for x in lorem ipsum; do
        echo $x
    done
    

    should now be written as

    for x [lorem ipsum] {
        echo $x
    }
    
  5. 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

23 Sep 00:22
Compare
Choose a tag to compare
v0.6 Pre-release
Pre-release

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 like green and bg-red (#301). For instance, this writes haha 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 (try echo $le:bindg[ and Tab).

v0.5

23 Sep 00:23
Compare
Choose a tag to compare
v0.5 Pre-release
Pre-release

Breaking changes

  • The println builtin is now known as echo, shadowing the external echo.
  • 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 predicate deepeq is now known simply as eq.
    • The == builtin now compares numbers -- == 1 1.0 is true, while == a a throws an exception. To compare strings, use either ==s or is.
  • Automatic use'ing has been removed. All modules must be used before use.
  • The into-lines builtin is now known as to-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 of each 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.