rsh 0.8.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.
We're happy to announce the 0.8.0 release of Rsh. This continues a series of internal improvements, with better stability and correctness, and, of course, new features.
Where to get it
Rsh 0.8.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>.
❯ ls rsh_plugin_* | sort-by name | get name
────┬──────────────────────
# │ <value>
────┼──────────────────────
0 │ rsh_plugin_average
1 │ rsh_plugin_binaryview
2 │ rsh_plugin_fetch
3 │ rsh_plugin_inc
4 │ rsh_plugin_match
5 │ rsh_plugin_post
6 │ rsh_plugin_ps
7 │ rsh_plugin_str
8 │ rsh_plugin_sum
9 │ rsh_plugin_sys
10 │ rsh_plugin_textview
11 │ rsh_plugin_tree
────┴──────────────────────
Unwrapping your presents (jonathandturner, andrasio, with help from ubsan)
A classic trick when writing Rust is to use the
.unwrap() method. This method gives you a quick way
to say "panic if you see this happen". When
prototyping, it's easy to use this as a way to develop code
more quickly, but as a codebase matures you move away from it.
It was time for Rsh to move away from using this shortcut. Fixing the unwraps is a lot of work, but the end result is a codebase that reports errors more reliably and doesn't panic as often if something unexpected happens -- which just is what you want when you're making a shell!
We're happy to say there are now no more unwraps in the Rsh codebase. We have more improvements in mind, but this already is a big upgrade from where we were a few weeks ago.
Clippy cleanliness (thibran, vorot93, jonathandturner)
Along the same theme of making code as clean as we can, we
recently adopted using the clippy tool. Clippy is a
tool to help point out common mistakes or inefficiencies in your
Rust code. The end result of working through its warnings is
often a cleaner looking codebase that's also a bit more
efficient as a result.
The Rsh codebase is now clippy-clean, and we're enforcing this on every new checkin to the codebase.
Improved
which gets better (avandesa)
> which which
───────┬──────────────────────────┬─────────
arg │ path │ builtin
───────┼──────────────────────────┼─────────
which │ rsh built-in command │ Yes
───────┴──────────────────────────┴─────────
We're in the process of improving some of our existing
built-in commands to make them more Rsh-like. In this release,
the which command has a bit more of a Rsh-feel. It
will tell you the path and if the command is an internal builtin
command or an external command.
ps gets better (jonathandturner)
─────┬───────┬──────────────────────────────────────┬──────────┬─────────┬──────────┬──────────
# │ pid │ name │ status │ cpu │ mem │ virtual
─────┼───────┼──────────────────────────────────────┼──────────┼─────────┼──────────┼──────────
250 │ 4729 │ ibus-engine-simple │ Sleeping │ 0.0000 │ 3.3 MB │ 176.7 MB
251 │ 5964 │ gedit │ Sleeping │ 0.0000 │ 29.2 MB │ 496.5 MB
252 │ 5860 │ seahorse │ Sleeping │ 0.0000 │ 24.0 MB │ 488.7 MB
253 │ 6594 │ gnome-terminal-server │ Sleeping │ 0.0000 │ 47.8 MB │ 675.0 MB
The ps command has gained a few new columns:
"mem" and "virtual" for helping you track
memory usage.
OpenOffice .ods support (coolshaurya)
Fresh off the presses is initial support for opening .ods files. Similarly to our xlsx support, this will allow you to open .ods files and read in their data, separated by the sheets.
Improved keyboard navigation (Aloso)
We now support moving left by-word using the ctrl+left and ctrl+right keyboard shortcuts.
New commands
uniq (notryanb)
With 0.8.0, you'll also be able to remove duplicate rows
from your tables with the uniq command:
> open test.csv
───┬────────────┬───────────┬────────────┬──────
# │ first_name │ last_name │ rusty_at │ type
───┼────────────┼───────────┼────────────┼──────
0 │ Andrés │ Robalino │ 10/11/2013 │ A
1 │ Andrés │ Robalino │ 10/11/2013 │ A
2 │ Jonathan │ Turner │ 10/12/2013 │ B
3 │ Yehuda │ Katz │ 10/11/2013 │ A
───┴────────────┴───────────┴────────────┴──────
> open test.csv | uniq
───┬────────────┬───────────┬────────────┬──────
# │ first_name │ last_name │ rusty_at │ type
───┼────────────┼───────────┼────────────┼──────
0 │ Andrés │ Robalino │ 10/11/2013 │ A
1 │ Jonathan │ Turner │ 10/12/2013 │ B
2 │ Yehuda │ Katz │ 10/11/2013 │ A
───┴────────────┴───────────┴────────────┴──────
New built-in variable (jonathandturner)
With 0.8.0, we've moved away from the
$rsh:path built-ins. Now, there's just one
built-in for internal values: $rsh. Using
echo $rsh will show you the table of current
values.
Fixing bugs (jonathandturner, sandorex, miller-time, quebin31, thegedge)
As always, we also fixed bugs. In 0.8.0, you'll see
improvements with UTF-8, the pick command,
correctly handling required positional arguments, CTRL+L clear
screen, and faster response times for external commands.
What's coming
We're well on our way to 0.10.0. That's right, we're not close to our 1.0 release just yet. After 0.9, we'll continue with a release every three weeks. Expect to see Rsh continue to mature and stabilize.