github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/changelog/v2.7.md (about)

     1  # v2.7
     2  
     3  This update has introduced another potential breaking change for your safety: zero length arrays now fail by default. Also errors inside subshells will cause the parent command to fail if ran inside a `try` or `trypipe` block.
     4  
     5  ### Breaking Changes:
     6  
     7  * zero length arrays returned from subshells (eg `echo @{g this-file-does-not-exist}`) should fail by default, like unset variables. This is enabled by default but can be disabled via `config: set proc strict-arrays false`
     8  
     9  * autoglob should fail if it doesn't match any results. eg `@g echo this-file-does-not-exist.*`
    10  
    11  * Subshells should fail parent command when used inside `try` and `trypipe` blocks. eg `try { echo ${false} }`
    12  
    13  ### Features:
    14  
    15  * `function` now supports defining parameters
    16  
    17  * Added support fro `&&` eg `do-something && do-something-else` for chaining successful commands
    18  
    19  * Added support for `||` eg `do-something || do-something-else` for chaining unsuccessful commands
    20  
    21  * Added support for writing to the terminal emulator's titlebar via `config: set shell titlebar-func { block }`
    22  
    23  * `titlebar-func` can also be written to your `tmux` window title via `config: set shell tmux-echo true`.
    24  
    25  * New reserved variable: `$HOSTNAME`
    26  
    27  * New reserved variables: `$1` (and upwards) which correlates to the scope's parameter index. `$1` is the functions first parameter. `$2` is the second. `$13` is the thirteenth. 
    28  
    29  * New reserved variable: `$0` which contains the function name
    30  
    31  * New event: `onCommandCompletion` (this is experimental and subject to change in the next release)
    32  
    33  * Macro variables. eg `echo Hello ^$name` will prompt the user to enter a name. Macro variables are only support in the REPL
    34  
    35  * `read` now supports flags (eg default option, etc) to allow for a better experience in shell scripting
    36  
    37  ### Minor Changes:
    38  
    39  * You can now overwrite `onKeyPress` events. This no longer produces an error forcing you to remove the old event before adding the new one
    40  
    41  * Autocompletion suggestions shouldn't be sorted is results include paths (improves the ordering of autocompletion suggestions)
    42  
    43  * Autocompletion suggestions for `openagent` builtin
    44  
    45  * Autocompletion suggestions for hashtags
    46  
    47  * Test counts re-added to website
    48  
    49  * Windows should show file extensions by default in autocompletion results
    50  
    51  ### Bug Fixes:
    52  
    53  * Fix inverted logic on `forceTTY`: `config: get proc force-tty false` set by default, which then proxies STDERR and prints them in red
    54  
    55  * ctrl+c (^c) now currectly sends SIGTERM rather than just ending the child process
    56  
    57  * Better handling of SIGTERM
    58  
    59  * SIGTSTP isn't working. Switched to SIGSTOP when  (^z) doesn't 
    60  
    61  * Fix panic in event `onFilesystemChange` where fileRef is not getting passed correctly
    62  
    63  * Fix panic in event `onFilesystemChange` where path is zero length string
    64  
    65  * Some improvements to variable previews in the REPL
    66  
    67  * `count` should check if it is a method
    68  
    69  * AST cache now checked more regukarly. This is to reduce the risk of memory leaks during fuzz or load testing
    70  
    71  * `murex-docs` still referred to `len` builtin. That should be changed to `count`
    72  
    73  * Lots of fuzzing added -- a few edge case bugs discovered
    74  
    75  <hr>
    76  
    77  Published: 15.05.2022 at 22:49
    78  
    79  ## See Also
    80  
    81  * [Reserved Variables](../user-guide/reserved-vars.md):
    82    Special variables reserved by Murex
    83  * [`&&` And Logical Operator](../parser/logical-and.md):
    84    Continues next operation if previous operation passes
    85  * [`@g` (autoglob) ](../commands/autoglob.md):
    86    Command prefix to expand globbing (deprecated)
    87  * [`config`](../commands/config.md):
    88    Query or define Murex runtime settings
    89  * [`event`](../commands/event.md):
    90    Event driven programming for shell scripts
    91  * [`function`](../commands/function.md):
    92    Define a function block
    93  * [`openagent`](../commands/openagent.md):
    94    Creates a handler function for `open`
    95  * [`read`](../commands/read.md):
    96    `read` a line of input from the user and store as a variable
    97  * [`||` Or Logical Operator](../parser/logical-or.md):
    98    Continues next operation only if previous operation fails
    99  
   100  <hr/>
   101  
   102  This document was generated from [gen/changelog/v2.7_doc.yaml](https://github.com/lmorg/murex/blob/master/gen/changelog/v2.7_doc.yaml).