rsh 0.10.0
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.
Greetings and welcome to the 10th release of rsh! Yes, that's right this is the tenth release of Rsh we've put out in the wild, and oh is this release wild. So let's stop dilly-dallying and get right to it, shall we?
Where to get it
Rsh 0.10.0 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 more goodies, you can install
cargo install rsh --features=stable.
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
Scripts! (thegedge, jonathandturner)
Yes, you read that right, we're just beginning to add support for running Rsh scripts. So far, these scripts are simple things. Rsh will go line by line and run each line. But we're looking forward to building up support with more features as we go.
To run a script, you just call rsh and pass in it
the script file:
> cat hello_world.rsh
echo hello
echo world
> rsh hello_world.rsh
hello
world
Running commands from outside Rsh (jonathandturner)
Another fun features in this release is the ability to run a Rsh
command from outside of Rsh. Just like shells like Bash and
Windows CMD, you can now pass the -c flag and give
the pipeline you want to run:
> ./rsh -c "ls | get name"
─────┬───────────────────────────────
# │ <value>
─────┼───────────────────────────────
0 │ .cargo-lock
1 │ .fingerprint
2 │ build
3 │ deps
Shorthand flags (Amanita-muscaria)
Tired of typing those long flags that every Rsh command seems to have? Worry no more! You can now use short flags in many common Rsh commands. For example:
Instead of:
> ls --full
You can now use:
> ls -f
The shorthand flags are listed as part of the updated help section
Did someone say flags? (andrasio)
If you're coming to Rsh from other CLIs, you might have wondered why you always had to put flags at the end. A little annoying, right? We fixed it.
> ls *.sh --full
and now:
> ls --full *.sh
Use whichever you like best.
More plugins by default (andrasio)
We've extended the set of plugins installed with
cargo install rsh --features=stable to the whole
set of stable plugins. This cuts down on the amount of extra
plugins to install if you want the full set. It should also help
cut down on the confusion when users expected a command to be
available but wasn't installed by default. You can still
install without these additional commands, if you like, and pick
and choose the ones you want.
calc command (coolshaurya)
There's a new calc command in development that
can calculate the result of math expressions in a string.
> echo "2+3" | calc
5.000000000000000
kill command (sandorex)
Rsh now also has a cross-platform kill command, for
killing processes.
Command improvements
External commands can access $rsh (andrasio)
External commands commands can now access the
$rsh variable that holds internal values for Rsh.
Datetime parsing (Amanita-muscaria)
You can now parse datetime strings using the
str command.
du command now shows apparent and physical disk
usage (Amanita-muscaria)
The du command now lets you see both the amount of
space that directories appear to take as well as the amount of
total actual space they take up on the disk.
Better help message (jonathandturner)
By default, the help command now prints a little
more information by default to help you get started.
Lots of bugfixes/improvements (thegedge, UltraWelfare, jonathandturner, andrasio, avandesa, notryanb, coolshaurya, twitu)
Better errors for incorrect mv and incorrect flags,
better performance running external commands, better code
documentation, plugins can now have numbers in their names, test
directories can now have spaces in their names, fixed some
issues with cp, moved off of the
"futures-preview" crate to "futures"
official, fixes to working with external commands that don't
send line endings, improvements to textview and
more.
Looking ahead
Adding the ability to run scripts gives Rsh a lot more potential when used in larger tasks, and we're excited to continue to grow this support. This work comes out of the work to add aliases, which we're currently working on. It also opens up the possibility of running Rsh from other hosts in the future.
Scripting also lends itself to needing more structure, variables, and more. We're looking ahead to those, too.