Releases: lmorg/murex
v4.0.11200
Minor release: improved error messages raised when using variables
v4.0.11110
This release sees significant improvements for use with non-latin characters in both the interactive prompt and shell scripting. It introduces new syntax to make working with structured data even easier than before. As well as new data types and smoother user experience.
Breaking Changes:
-
$PWD
is no longer astr
. If you need to parse$PWD
as a string then you shouldout: $PWD
or use${pwd}
-
.
is now a valid bareword character for variables. This will break any instances in code that contain something likeout $hello.
however you can now useout $(hello).
syntax for safer string infixing
Features:
-
dot notation added for variables which allow accessing and writing to object properties. eg
$json.array.index
-
added support variable encapsulation via
$()
to avoid variable barewords from leaking into other values when infixed. eg$(foobar)
is the same as$foobar
-
variable names can now be Unicode, eg
$(比如) = "举手之劳就可以使办公室更加环保,比如,使用再生纸。"
-
Unicode wide characters are properly handled in readline
-
new data type
path
that is an object -
new data type
paths
-
support for lambdas added
-
readline
[ctrl]
+[f]
now supports word matching as well as regexp -
readline
[ctrl]
+[f]
now supports glob filters (eg*.txt
) too -
$ENV
and$GLOBAL
objects (deprecates the need forglobal
andexport
) -
improved error messages in expressions
-
scalars can be used as assignees in expressions, eg
$foo = "bar"
-
added
-i
flag to ssh autocompletion -
readline prompts are now buffered to reduce cursor flickering
Non-User Facing / Maintenance Changes:
- backend support added for data types to be dynamic objects
Bug Fixes:
-
better wide character support in auto completion suggestions
-
function parameters default and comment fields are no longer order dependent
-
better string parsing for barewords inside arrays and objects
-
ahead of time hint caching now done on demand per hint page rather than against every executable upon murex start up
-
new lines should be ignored in
%{}
-
bareword
true
andfalse
should be converted to boolean in%{}
-
autocomplete suggestions are now dedup'ed when delayed results return similar suggestions to fast results
-
various preview pane bug fixes
-
support for ANSI escape sequences in experimental (disabled by default) TTY buffer
-
correction to
count
docs
v3.1.3100
This release includes mostly bug fixes and new experimental features which are opt into. To enable all experimental features, set the environmental variable MUREX_EXPERIMENTAL
to any value. Or you can enable specific features individually via config
Breaking Changes:
- None
Features:
-
default
statement added toswitch
(this will deprecatecatch
, albeitcatch
will remain supported for compatibility) -
Option to change start directory:
config: set shell start-directory $path
(where $path is the working directory you wish to start the shell in) -
onCommandCompletion
event no spawns a pty. This allows capturing of stdout while still presenting a tty to the executing process -
EXPERIMENTAL: preview files. This can be enabled via
config: set shell preview-enabled true
-
EXPERIMENTAL: preview images. This can be enabled via
config: set shell preview-images true
-
EXPERIMENTAL: tty buffer. This can be enabled via
config: set shell tty-buffer-enabled true
-
ctrl
+r
has been tweaked to make it more user friendly -
Long overdue SIGWINCH signal handler to reflow after terminal resized
-
Lots of improvements to documentation
Non-User Facing / Maintenance Changes
- none
Bug Fixes:
-
re-added
columns
data-type to fixjobs
builtin -
added bang alternatives to the glob exception list
-
added missing support for
&&
tokens in expressions -
![]
can now produce empty maps -
fixed regression bug in file pipe mutex
-
fixed missing bounds check in statement parser
v3.0.9310
This is a major release that brings a significant number of changes and improvements, including a complete overhaul of the parser. Backwards compatibility is a high priority however these new features bring greater readability and consistency to shell scripting. So while the older syntax remains for compatibility, it is worth migrating over to the newer syntax for all new code being written
Breaking Changes:
-
Optional builtin removed:
bson
. This was disabled by default and likely never used. So it has been removed to reduce murex's testing footprint. It can easily be re-added if anyone does actually use it -
Optional builtin removed:
coreutils
. This was actually enabled by default for Windows builds. However rewriting Linux/UNIX coreutils for Windows support is a massive project in its own right and with the maturity of WSL there's almost no reason to run murex on "native Windows". So thecoreutils
builtin has been dropped to allow us to focus on the responsibilities of the shell
Features:
-
Support for expressions, eg
5 * 5
orfoobar = $foo + "bar"
, etc. This syntax can be used directly or specified specifically via theexpr
builtin -
New syntax sugar for creating JSON objects:
%{ foo: bar }
-
New syntax sugar for creating JSON arrays:
%[ foo bar ]
-
New syntax sugar for creating strings:
%()
(this is preferred over the, now deprecated, feature of parenthesis quotes) -
Ranges supported in
[]
(@[
is now deprecated) -
Support for multiline comments:
/# comment #/
. It is unfortunate this differs from C-style comments (/* comment */
) but this has to be the case because/*
is ambiguous for barewords in shells: is it a path and glob or a comment? Where as/#
isn't a common term since#
is already a comment -
If any processes pass
null
as a data type across the pipe, it will be ignored. This solves the problem where functions that don't write to STDOUT would still define the data type -
Config option auto-glob renamed to expand-glob, and now enabled by default
-
Globbing exclusion list. This allows you to avoid annoying prompts when parameters shouldn't be expanded as globs by the shell (eg when using regular expressions). This can be managed via shell expand-glob-unsafe-commands option in
config
-
@g
removed. It is no longer needed with expand-glob enabled by default -
New builtin:
continue
: skip subsequent processes in an iteration block and continue to next iteration -
New builtin:
break
: exit out of a block of code (eg in an iteration loop) -
Additional syntax for index (
[
):*1
: 1st row,*A
: 1st column -
New alias:
help
->murex-docs
. This brings murex a little more inline with Bash et al -
pre-cache-hint-summaries now enabled by default after testing has demonstrated it doesn't have nearly as expensive footprint as first assumed
-
Hitting TAB when nothing has been typed in the REPL will suggest past command lines
-
^
autocompletion added -
getfile
writes to disk if STDOUT is a TTY -
mkarray (eg
ja
) now writes an integer array if range is integers. egja: [1..3]
. This change wouldn't affecta
since that outputs as list of strings (for streaming performance reasons) rather than a data type aware document -
debug
(method) output tweaked -
Improved error messages in a number places
-
Revamped README / website landing page
Non-User Facing / Maintenance Changes
-
Minimum Go version supported is now 1.17.x
-
Main parser completely rewritten
-
ReadArray
API now requires acontext.Context
-
egrep
references changed togrep -E
to work around GNU grep deprecating support for egrep -
Added marshallers for
boolean
,null
-
Variables.GetValue()
now errors instead of returnsnil
when no variable set -
Additional tests. So many new tests added
-
Lots of code refactoring
Bug Fixes:
-
regexp
wasn't erroring if nothing was matched -
readline: fixed deadlock
-
append
andprepend
now type aware (no longer converts all arrays into string arrays) -
foreach
was setting variables as strings rather than honoring their original data type -
yarn
autocompletion errors should be suppressed -
spellcheck missing
break
causing more occasionally incorrect instances of underlined words -
config
wasn't passing data type when executing blocks via eval -
debug
wasn't setting data type when used as a function -
macro variables don't re-prompt when the same variable is used multiple times
v2.11.2200
This is a bug fix release:
- readline: fixed deadline in autocomplete
- suppress yarn errors while building yarn autocomplete suggestions
v2.11.2030
This is a bug fix release:
v2.11
This release mainly focuses on refinements in performance and usability, rather than introducing new features
Breaking Changes:
- None
Features:
-
File index caching for faster completions (eg on mechanical drives). This happens upon shell start up (except on Darwin for security reasons) and after every
cd
-
Relaxed
alias
syntax. It now supports whitespace between the=
statement (likeset
andlet
do) -
New aliases added for common methods which work against lists/arrays. Type
list.{TAB}
to see the complete list of methods -
Added support for alternative separator values in
struct-keys
-
Hint summaries are now cached, to improve performance on slower machines
-
Opt in support to pre-cache hint summaries. This will also auto-disable appending colon to command suggestions in autocomplete. This is not enabled by default because it could negatively affect performance on some slower machines and is more of an aesthetic improvement. You can enable it by adding
config: set shell pre-cache-hint-summaries true
to your murex profile -
New autocompletions for
yay
(ArchLinux) -
Some minor performance improvements
-
website: updates to docs
Bug Fixes:
-
readline: max field size adjusted for autocompletes so more completions are visible at one time
-
readline: all cropped autocompletions now provide an uncropped version in the hint text field
-
readline: fix bug with history not getting written
-
OS signals (^c et al) are now re-registered after each exec (fixes bug where some programs would "steal" ^c, breaking support for those signals upon subsequent execs)
-
Fixed regression bug in man page parsing
-
Added check for zero-length string used as a process name (this shouldn't ever happen under normal circumstances however closing this bug allows for a managed error rather than the code panicking)
-
readline: Prompt environment reset on each loop (this change is to future-proof against potential bugs)
-
Fixed race condition bug when some of the tests are run concurrently (this bug only existed in the unit tests but sometimes caused those tests to fail)
-
Added CI tests for Go v19.x
v2.10.2400
Bug fix for range variables in v2.10
v2.10
This release brings a few minor improvements and bug fixes rather than big new headline features.
Breaking Changes:
- None
Features:
- Added support for ranges to be used as variables. eg
f: +f -> set v
echo: @v[2..]
-
Complete re-write of
f
. It is now the tool I had always intended when I first created that builtin -
g
now supports being run as a method (eg to filter items from a file list) -
rx
now supports being run as a method (eg to filter items from a file list) -
Updated autocompletes for
git
-
Updated autocompletes for
terraform
Minor Changes:
-
Added support for profiling
-
Removed unused data types
-
Dropped
profile/
prefix from the module string for modules and profiles (as seen inFileRef
)
Bug Fixes:
-
Lots of improvements to how
||
and&&
are used in otherrunmode
's,try
, andtrypipe
-
autoglob prompt now has a mutex wrapped around it to prevent concurrent processes sending the prompt haywire
-
Spellchecker no longer underlines partial words
-
Better removal of \x16 and other non-printable characters leaking into readline
v2.9
This release focuses on testing and REPL usability improvements but also
includes updates several new run modes to make error handling easier in
larger scripts.
Breaking Changes:
- None
Features:
-
>>
redirect (append to file) operator added. This is just syntactic sugar for-> >>
. To redirect and overwrite/truncate a file use|>
rather than>
-
Support for automatic globbing in the commandline. This has to be enabled via
config: set shell auto-glob true
and you will get prompted for each glob. Any globs inside blocks will be ignored and this only works on the interactive prompt (ie not in scripts or background processes) -- these limitations are not a bug but by design -
Dynamic autocomplete suggestions are now cached for 5 seconds by default. This cache can be changed via the CacheTTL directive in
autocomplete
-
Additional scoping for
try
andtrypipe
. You can define the scope as being an entire function or a module. If set for an entire module then any functions, autocompletions, etc inside that module will inherit thattry
ortrypipe
mode automatically. These are set via the new builtinrunmode
-
New reserved variable
$PWD
(this was just a global variable previously) -
Additional flags added to range,
@[
-
New builtin,
man-get-flags
. This exposes murex's internal man page parser to the command line scripts -
Binaries now produced for ARM64 Windows
Minor Changes:
-
The order in which namespaces are looked up has been altered since
private
s should be resolved beforefunction
s -
Updated autocomplete for homebrew,
brew
-
New autocomplete for AWS CLI,
aws
-
New autocomplete for yarn,
yarn
-
murex unit tests should report progressively rather than everything upon completion
-
Minimum recommended version of Go has been raised to 1.15. This is due to some bugs in dependencies when running tests against v1.13 and v1.14. murex will technically compile and work on them but it not worth my time debugging why the CircleCI tests fail for those versions given their age
-
Vendor directory removed. This isn't really needed now support is focused on newer versions of Go
-
Website: New 404 error
-
Website: search bar added
-
The start of a massive push towards upping the test coverage
-
Lots of improvements to the docs
Bug Fixes:
- FileRef module string for functions forked from the REPL changed to
murex/shell
to bring it inline with the naming convention of other modules