rsh 0.30
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.30 of Rsh. This release adds big improvements to performance and simplicity of the engine.
Where to get it
Rsh 0.30 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.
If you'd like to try the experimental paging feature in this
release, you can install with
cargo install rsh --features=table-pager.
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
Performance improvements (jonathandturner)
Nu, now noticeably faster
The 0.30 release is the first to include the engine-p experimental approaches that we mentioned in the last release. These changes streamline the engine, moving it from async streams to iterators, simplifying how commands handle their arguments, and how outputs are passed from one command to the next.
The end result is an engine that is both simpler and much
faster. In the above example we run two different benchmarks.
The first is a run of
this script
in the rsh script repo. The second is a tight processing loop
over many 10 million small records:
echo 1..10000000 | prepend 777 | append 555 | where $it >
7 | length.
Though the performance numbers are still early, they're extremely promising.
New built-in variable $scope (stevenbarragan,
fdncred)
We're experimenting with a new built-in variable called
$scope. This gives you access to definitions in
scope, including variables.
New Commands
-
math sqrt(luccasmmg) -
any?andall?(andrasio) -
path parse,path join, andpath split(kubouch) -
into int(efx) -
query json(fdncred). This is a new experimental query function as we explore how we'd like to do data querying in rsh.
Documentation (andrasio)
We have a new guide on how to create rsh commands.
Improvements (LhKipp, luccasmmg, waldyrious, ilius, fdncred, andrasio, DonnutPanic, ammrkn, jonathandturner, schrieveslaach, daschl, nightscape)
- Lots of internal optimization updates: 1, 2, 3, 4, 5
- Now appends to the history instead of replacing it
- API improvements to allow embedded rsh to have custom commands
-
Internal implementation
improvements to
which, toall, tomathcommands, totoandfromcommands, tocompact -
Updated
echo ..to no longer prints integers -
Removed
help flags from the
$scope.commandsdisplay - Removed the dupes in get_commands/get_command_names
- Fixes to viewing Value as a filepath
-
Move
arg deserialization out of
str - Cleaned up error handling
- Fixes to how rest arguments are handled
-
Fixes to
ansi rgb fg - Updated the default prompt
- Autoview and table now read from the in-memory config
- Do not store whitespace entries in the history
- Simplified internal handling of the runnable context
- Fixed external output busy-waiting
-
Remove
rm's trash flag if it's not supported - Fixed a panic when timestamp is out of range
- Sysinfo dependency has been updated
- Config commands are now more unified internally
- Added TiB and PiB units
- Improved auto-suggestion for aliases and custom commands
- More logging and tests
- Now parses decimal units
- Use one main function to run scripts
- Fixed errors when deleting a FIFO
- Fixed capitalizations of Unicode
- Fixes to path sync'ing, more path fixes, and improvements to dynamic blocks
Breaking changes
Removed help shell
We have removed the help shell to simplify code.
Removed ambiguous units
We've also removed
yr and mon units
because their meaning was too confusing.
New set of default features
The
default feature list is now simpler. This means that doing a cargo install will give
you fewer of the plugins than previously. We're still
working to refine this list. Please do give feedback if these
changes negatively impact you.
Looking ahead
The new engine and performance improvements should open the door for even more improvements in the future. These improvements also make it easier to explore adding more sophisticated completion logic in the future, as that logic could be written in rsh itself.