Version 0.11 has been released four months after 0.10, bringing many new features and bugfixes. There is no newsletter accompanying this release (instead, there is a tweet).
As usual, prebuilt binaries can be found in get.
Breaking Changes
-
The syntax for importing modules in nested directories with
usehas changed.Previously,
useaccepts colon-delimited components, and replace the colons with slashes to derive the path: for instance,use a:b:cimports the modulea/b/c.elvunder~/.elvish/lib, under the namespacea:b:c. Now, to import this module, you should useuse a/b/cinstead, and it will import the same file under the namespacec.It is not yet possible to rename the module when importing it; this makes it hard to import modules with the same filename living under different directories and will be addressed in the next version.
The current implementation of
usestill supports the use of colons to affect the name under which the module is imported: for instance,use a/b:cimports the filea/b/c.elvunder the nameb:c. However, this feature should be considered undocumented and will be removed in the next version. -
Module imports are now scoped lexically, akin to how variables are scoped. For instance,
use rein one module does not affect other files; neither does{ use re }affect the outer scope. -
The variable a function
funcmaps to is now$func~instead of$&func. The ampersand&is now no longer allowed in variable names, while the tilde~is. A tool has been provided to rewrite old code. -
Strings are no longer callable (#552). A new external has been added to support calling external programs dynamically.
-
It is now forbidden to assign non-strings to environment variables. For instance,
E:X = []used to assign the environment variableXthe string value"[]"; now it causes an exception.
Notable Fixes and Enhancements
Supported Platforms
-
Support for Go 1.7 has been dropped, and support for Go 1.9 has been added.
-
Elvish now has experimental support for Windows 10. Terminal and filesystem features may be buggy. Prebuilt binaries for Windows are also available.
-
Prebuilt binaries for AMD64 and ARM64 architectures on Linux are provided.
Language
-
It is now possible to
userelative paths. For instance, in modulea/b/c/foo.elv(under~/.elvish/lib),use ./baris the same asuse a/b/c/bar, anduse ../baris the same asuse a/b/bar. The resolved path must not escape thelibdirectory; for instance,use ../barfrom~/.elvish/lib/foo.elvwill throw cause a compilation error. -
A new builtin variable,
$value-out-indicator, can now be used to customize the marker for value outputs (#473). -
A new builtin command
to-stringhas been added. -
Special forms like
ifnow works correctly with redirections and temporary assignments (#486). -
A primitive for running functions in parallel,
run-parallel, has been added (#485). -
The
splitsbuiltin now supports a&maxoption. -
A new
srcbuiltin can now be used to get information about the current source. -
A new builtin variable
$argscan now be used to access command-line arguments.
Editor
-
A maximum wait time can be specified with $edit:-prompts-max-wait to prevent slow prompt functions from blocking UI updates (#482).
-
Execution of hook functions are now correctly isolated (#515).
-
A new matcher
edit:match-substrhas been added. -
The editor is now able to handle Alt-modified function keys in more terminals (#181).
-
Location mode now always hides the current directory (#531).
-
Ctrl-H is now treated the same as Backspace (#539).
-
It is now possible to scroll file previews with Alt-Up and Alt-Down.
-
The height the editor can take up can now be restricted with
$edit:max-height.
Misc
-
The Elvish command supports a new
-buildinfoflag, which causes Elvish to print out the version and builder of the binary and exit. Another-jsonflag has also been introduced; when present, it causes-buildinfoto print out a JSON object. -
Elvish now handles SIGHUP by relaying it to the entire process group (#494).
-
The daemon now detects the path of the Elvish executable more reliably, notably when Elvish is used as login shell (#496).
-
When an exception is thrown and the traceback contains only one entry, the traceback is now shown more compactly.
Before:
~> fail x Exception: x Traceback: [interactive], line 1: fail xNow:
~> fail x Exception: x [tty], line 1: fail x