github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/gen/changelog/v2.4_doc.yaml (about) 1 - DocumentID: v2.4 2 Title: >- 3 v2.4 4 CategoryID: changelog 5 DateTime: 2021-12-09 08:00 6 Summary: >- 7 This release introduces a strict mode for variables, new builtin, performance 8 improvements, and better error messages; plus a potential breaking change 9 Description: |- 10 There are a number of new features in this release 11 12 ### Breaking Changes: 13 14 * mkarray (`a` et al) no longer returns an error if the start and end ranges 15 are the same. Instead it returns an array of 1 value. 16 17 ### User Facing Changes: 18 19 * Strict variables now supported (like `set -u` in Bash). This will mean any 20 variables passed that haven't been initialized beforehand will cause that 21 pipeline to fail. Currently this is opt in, a future release of Murex will 22 flip that and make it opt out. So take this opportunity to enable it in your 23 `~/.murex_profile` and test your scripts. Enable this via `config`: 24 ``` 25 config: set proc strict-vars true 26 ``` 27 This feature was requested in [issue #380](https://github.com/lmorg/murex/issues/380). 28 29 * New builtin: `datetime`. This builtin allows you to convert date and/or time 30 strings of one format into strings of another format. `datetime` is a 31 supercharged alternative to the UNIX command `date` aimed at making scripting 32 easier. 33 34 * mkarray (`a` et al) now supports dates. eg `[01-Jan-20..05-May-21]`. If no 35 start nor end date appears then mkarray assumes range starts or ends at 36 current date. 37 38 * `openagent` profile for `image` data types has been improved. Murex now 39 better supports tmux and iTerm2. 40 41 * `runtime --config` now displays `FileRef` for every `set` as well as `define`, 42 named `FileRefSet` and `FileRefDefine` respectively. So you can now easily 43 trace where global config is being set and defined. 44 45 * Better error messages in the interactive terminal. 46 47 * Prompt now defaults to only displaying current directory rather than the full 48 path. You can revert this change by adding your own prompt in `config`. eg: 49 ``` 50 config: set shell prompt { 51 out "{RESET}{YELLOW}${pwd_short} {RESET}» " 52 } 53 54 config: set shell prompt-multiline { 55 let len = ${pwd_short -> wc -c} - 1 56 printf "%${$len}s » " $linenum 57 } 58 ``` 59 60 * Parser updated to better support multiline pipelines where the newline is 61 escaped and a comment exists after [issue #379](https://github.com/lmorg/murex/issues/379). 62 This only applies to shell scripts, the interactive terminal hasn't yet been 63 updated to reflect this change. 64 65 * Fixed regression bugs with autocomplete parameters that affected some dynamic 66 blocks. 67 68 * `readline` now caches syntax highlighting and hint text to improve the 69 responsiveness of the interactive terminal. This is set to a hard limit of 70 200 cached items however that will be a configurable metric in a future 71 release. Also planned for the future is caching autocompletion suggestions. 72 73 * Loading message added for the default profile, ie the one that is compiled 74 into and thus shipped with Murex. 75 76 * Fixed bug with `fid-list` and `jobs` where they were outputting the `p.Name` 77 struct rather than `p.Name.String()`. This lead to the process name appearing 78 garbled under some circumstances. 79 80 * `{BG-BLUE}` emitted the wrong ANSI escape code, this has been corrected. 81 82 * Several `readline` bug fixes. 83 84 ### Non-User Facing / Maintenance Changes: 85 86 * Thread safe copying of parameters upon fork. The previous code never actually 87 generated any race conditions and I don't think ever could. However it was 88 ambiguous. This new code makes the copy more explicit and appears to have 89 also brought some minor performance improvements in benchmarks too. 90 91 * Behavioural test framework has been refactored to make it easier to add new 92 behavioural tests. 93 94 * Lots of new tests added. 95 96 * Updated documentation. 97 Synonyms: 98 Related: 99 - a 100 - ta 101 - ja 102 - datetime 103 - config 104 - runtime 105 - open 106 - openagent 107 - fid-list 108 - fileref 109 - profile 110 - modules 111 - ansi 112 113 114