rsh 0.26
rsh, or Rsh for short, is a new shell that takes a modern, structured approach to your commandline. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful commandline pipelines.
Today, we're releasing 0.26 of Rsh. It's a polish release with lots of improvements.
Where to get it
Rsh 0.26 is available as
pre-built binaries
or from
crates.io. If you have Rust installed you can install it using
cargo install rsh.
If you want all the goodies, you can install
cargo install rsh --features=extra.
As part of this release, we also publish a set of plugins you
can install and use with Rsh. To install, use
cargo install rsh_plugin_<plugin name>.
What's New
Rest support in custom commands (LhKipp, jonathandturner)
You can now refer to a rest argument in your custom command:
def my-cmd[...rest:int] {
echo $rest | math sum
}
Elements of the rest are referred to with positions, like
$rest.1 for the 2nd position.
Short flags in custom commands (LhKipp)
You can now also added an optional shorthand flag to longhand flags:
def foo [--bar(-b): int] {
echo $bar
}
foo -b 10
foo --bar 10
Improved build times (jonathandturner, stormasm)
When building from scratch, you may now notice that rsh builds slightly faster. This comes from refactoring large crates into smaller crates and replacing some of our support crates with similar crates that compile faster.
Improvements
I hope you like improvements. We got a lot of them this release.
-
fdcnred added support for using
multi-byte chars as padding, improved
ansi and char support, improved the output of
sys, optimized some regex usage, removedsetfrom Windows built-ins, added support for comparing a string and a filepath - JosephTLyons removed unnecessary clones and fixed some test macros
-
andrasio added
column path support to many
strcommands - jonathandturner added error checking for bad rows in column paths, added proper flushing of stdout, split rsh-cli and rsh-engine, treat the startup commands a single script which improves startup times, fixed reading/writing of bigint/bigdecimal
- baoyachi updated shadow-rs support, removed some of the git support that was no longer needed
-
kubouch added the
--skip flag to
nth -
ahkrr fixed
variable scopes for
defparameters - brightly-salty replaces the dirs/directories supporting crates
- jankeronmes fixed Gitpod tests
-
LhKipp fixed a
parser bug that prevented invocations and ranges from being
parsed correctly, added
defdocumentation, updatedaliasdocs - DivineGod moved keybinding_path to rsh-data
-
Gymea fixed the
dirs dependency in rsh-engine, improved the
helplogic when the command does not have a description, fixedwhichoutput for aliases - gillespiecd added the support for reverse ranges
- stormasm refactored rsh-cli and split off commands into rsh-command
- TrevorAC99 fixed a rust-embed build breakage
Breaking changes
-
psandsysare now served using a different supporting crate. The functionality difference between the old crate and the new crate may mean a lack of fields that existed before, or different values than before (as it may be calculated differently). -
We removed
str set. This command was one of the first of its style and has since been replaced by more general commands likeupdate. - Internal architecture: the Primitive case for lines has been removed. Instead, use strings.
- Internal architecture: the Path and Pattern primitives are now called FilePath and GlobPattern respectively.
Looking forward
We've been humbled by the feedback we got on the 0.25 release and appreciate the support. Looking forward, we'll be continuing to polish the features that landed in 0.25 as we prepare for using these features in larger scripts and in custom completion logic.