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