github.com/elves/elvish@v0.15.0/website/blog/0.11-release-notes.md (about)

     1  Version 0.11 has been released four months after 0.10, bringing many new
     2  features and bugfixes. There is no newsletter accompanying this release
     3  (instead, there is a
     4  [tweet](https://twitter.com/RealElvishShell/status/953781788706557952)).
     5  
     6  As usual, prebuilt binaries can be found in [get](../get/).
     7  
     8  # Breaking Changes
     9  
    10  -   The syntax for importing modules in nested directories with `use` has
    11      changed.
    12  
    13      Previously, `use` accepts colon-delimited components, and replace the colons
    14      with slashes to derive the path: for instance, `use a:b:c` imports the
    15      module `a/b/c.elv` under `~/.elvish/lib`, under the namespace `a:b:c`. Now,
    16      to import this module, you should use `use a/b/c` instead, and it will
    17      import the same file under the namespace `c`.
    18  
    19      It is not yet possible to rename the module when importing it; this makes it
    20      hard to import modules with the same filename living under different
    21      directories and will be addressed in the next version.
    22  
    23      The current implementation of `use` still supports the use of colons to
    24      affect the name under which the module is imported: for instance,
    25      `use a/b:c` imports the file `a/b/c.elv` under the name `b:c`. However, this
    26      feature should be considered undocumented and will be removed in the next
    27      version.
    28  
    29  -   Module imports are now scoped lexically, akin to how variables are scoped.
    30      For instance, `use re` in one module does not affect other files; neither
    31      does `{ use re }` affect the outer scope.
    32  
    33  -   The variable a function `func` maps to is now `$func~` instead of `$&func`.
    34      The ampersand `&` is now no longer allowed in variable names, while the
    35      tilde `~` is. A [tool](https://github.com/elves/upgrade-scripts-for-0.11)
    36      has been provided to rewrite old code.
    37  
    38  -   Strings are no longer callable
    39      ([#552](https://github.com/elves/elvish/issues/552)). A new
    40      [external](../ref/builtin.html#external) has been added to support calling
    41      external programs dynamically.
    42  
    43  -   It is now forbidden to assign non-strings to environment variables. For
    44      instance, `E:X = []` used to assign the environment variable `X` the string
    45      value `"[]"`; now it causes an exception.
    46  
    47  # Notable Fixes and Enhancements
    48  
    49  ## Supported Platforms
    50  
    51  -   Support for Go 1.7 has been dropped, and support for Go 1.9 has been added.
    52  
    53  -   Elvish now has experimental support for Windows 10. Terminal and filesystem
    54      features may be buggy. [Prebuilt binaries](../get/) for Windows are also
    55      available.
    56  
    57  -   Prebuilt binaries for AMD64 and ARM64 architectures on Linux are provided.
    58  
    59  ## Language
    60  
    61  -   It is now possible to `use` relative paths. For instance, in module
    62      `a/b/c/foo.elv` (under `~/.elvish/lib`), `use ./bar` is the same as
    63      `use a/b/c/bar`, and `use ../bar` is the same as `use a/b/bar`. The resolved
    64      path must not escape the `lib` directory; for instance, `use ../bar` from
    65      `~/.elvish/lib/foo.elv` will throw cause a compilation error.
    66  
    67  -   A new builtin variable,
    68      [`$value-out-indicator`](../ref/builtin.html#value-out-indicator), can now
    69      be used to customize the marker for value outputs
    70      ([#473](https://github.com/elves/elvish/issues/473)).
    71  
    72  -   A new builtin command [`to-string`](../ref/builtin.html#to-string) has been
    73      added.
    74  
    75  -   Special forms like `if` now works correctly with redirections and temporary
    76      assignments ([#486](https://github.com/elves/elvish/issues/486)).
    77  
    78  -   A primitive for running functions in parallel,
    79      [`run-parellel`](../ref/builtin.html#run-parallel), has been added
    80      ([#485](https://github.com/elves/elvish/issues/485)).
    81  
    82  -   The [`splits`](../ref/builtin.html#splits) builtin now supports a `&max`
    83      option.
    84  
    85  -   A new [`src`](../ref/builtin.html#src) builtin can now be used to get
    86      information about the current source.
    87  
    88  -   A new builtin variable [`$args`](../ref/builtin.html#args) can now be used
    89      to access command-line arguments.
    90  
    91  -   The [`del`](../ref/language.html#deleting-variable-or-element-del) special
    92      command can now delete map elements
    93      ([#79](https://github.com/elves/elvish/issues/79)).
    94  
    95  ## Editor
    96  
    97  -   A maximum wait time can be specified with
    98      [\$edit:-prompts-max-wait](../ref/edit.html#edit-prompts-max-wait) to
    99      prevent slow prompt functions from blocking UI updates
   100      ([#482](https://github.com/elves/elvish/issues/482)).
   101  
   102  -   Execution of hook functions are now correctly isolated
   103      ([#515](https://github.com/elves/elvish/issues/515)).
   104  
   105  -   A new [matcher](../ref/edit.html#matcher) `edit:match-substr` has been
   106      added.
   107  
   108  -   The editor is now able to handle Alt-modified function keys in more
   109      terminals ([#181](https://github.com/elves/elvish/issues/181)).
   110  
   111  -   Location mode now always hides the current directory
   112      ([#531](https://github.com/elves/elvish/issues/531)).
   113  
   114  -   Ctrl-H is now treated the same as Backspace
   115      ([#539](https://github.com/elves/elvish/issues/539)).
   116  
   117  -   It is now possible to scroll file previews with
   118      <span class="key">Alt-Up</span> and <span class="key">Alt-Down</span>.
   119  
   120  -   The height the editor can take up can now be restricted with
   121      [`$edit:max-height`](../ref/edit.html#editmax-height).
   122  
   123  ## Misc
   124  
   125  -   The Elvish command supports a new `-buildinfo` flag, which causes Elvish to
   126      print out the version and builder of the binary and exit. Another `-json`
   127      flag has also been introduced; when present, it causes `-buildinfo` to print
   128      out a JSON object.
   129  
   130  -   Elvish now handles SIGHUP by relaying it to the entire process group
   131      ([#494](https://github.com/elves/elvish/issues/494)).
   132  
   133  -   The daemon now detects the path of the Elvish executable more reliabily,
   134      notably when Elvish is used as login shell
   135      ([#496](https://github.com/elves/elvish/issues/496)).
   136  
   137  -   When an exception is thrown and the traceback contains only one entry, the
   138      traceback is now shown more compactly.
   139  
   140      Before:
   141  
   142      ```elvish-transcript
   143      ~> fail x
   144      Exception: x
   145      Traceback:
   146        [interactive], line 1:
   147          fail x
   148      ```
   149  
   150      Now:
   151  
   152      ```elvish-transcript
   153      ~> fail x
   154      Exception: x
   155      [tty], line 1: fail x
   156      ```