rsh 0.33
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.33 of Rsh. This release includes improved completions, support for pipeline variables, syntax theming and more.
Where to get it
Rsh 0.33 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
Improved completions (fdncred, NiklasJonsson, kubouch, andrasio, jt)
We've begun the completion improvements that have been planned for some time. In this release, we've added completions for alias definitions, source imports, completions for quoted paths, completions while inside of a pipeline, completions in incomplete expressions, subcommand completions and more.
On Windows, we've
sped up path completions. We've also reworked path handling, which should help make
path completions in Windows more consistent, including handling of ~.
Behind the scenes, we've also refactored completions into their own crate, so that we can more easily grow the areas where completions are supported.
Pipeline vars (jt)
Sometimes, when you're working on a pipeline, you want to
refer to values coming in using an xargs style. With 0.33,
we've introduced a new built-in variable called
$in. The $in variable will collect the
pipeline into a value for you, allowing you to access the whole
stream as a parameter.
> echo 1 2 3 | $in.1 * $in.2
6
New distributions (itsme-alan, zmedico)
You can now install rsh from the winget repo and from gentoo.
More natural pipeline output (jt)
In this release, we've also relaxed some of the strictness
in when output happens to always be at the end of a pipeline. In
previous versions of rsh, it was common for people to try an
example like
echo "hello "; echo "world"
only to be confused why they only saw world in the
output. Now, we treat ; like carriage return, so
that pipelines more naturally output their results just as they
do at the end of lines.
You can add back in the ignore ability using the new
ignore command, which will ignore any stdout or
data output from the previous command in the pipeline. For
example, ls | ignore.
Syntax highlighting themes (fdncred)
Nu, with configurable colors
You can now configure the colors used in syntax highlighting. For the currently supported token types and examples, check out the original PR.
New commands
-
nathom added
unlet_envto remove environment variables from the current scope -
jt added the
ignorecommand to ignore pipeline output -
fdncred added
ansi gradientcommand
Additional improvements
-
fdncred added
path and environment path separators to
charto allow for creating more portable scripts, fixed an issue with error colors, added single and double quote to char, version now lists plugins - efx updated commands to engine-p style
- chrisfinazzo fixed some of our helper scripts
- andrasio, jt removed the clap dependency, so rsh parses its own parameters
- vladdoster landed some doc improvements
- NiklasJonsson improved rsh doc comments
- reaganmcf added an optional plugin for handling mp4 metadata and bumped sysinfo
- voanhduy1512 added support for invoking external commands via string interpolation
-
Garfield96 added
--sheets for xlsx/ods,
--tables for
from sqlite, and fixed a panic with giving empty tables toto sqlite -
kubouch improved
errors and updated commands to engine-p, improved some
internal handling of
def, clarified theexechelp message -
sholderbach improved
wheredocs - jt added parsing for hex, binary, and octal numbers
- pka improved territory in locale support for byte formatting
- ahkrr fixed handling of # in filenames
- jt, LovecraftianHorror, apatrushev, sholderbach, elferherrera, inet56 added fixes to the website and docs
- fdncred, efx, jt, and andrasio all added scripts and fixes to the scripts repo
Looking ahead
We're continuing to improve our dataframe support, and hope to be rolling it out a part of the default commands in the next release. Elfherrera has been hard at work improving the dataframe support to get it ready.