rsh 0.71
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 version 0.71 of Rsh. This release includes new operators, better consistency, improved completions, and more.
Where to get it
Rsh 0.71 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 built-in goodies, such as support for
dataframes and SQLite databases, you can install it via
cargo install rsh --features=extra.
As part of this release, we also publish a set of optional
plugins you can install and use with Rsh. To install, use
cargo install rsh_plugin_<plugin name>.
Themes of this release
New ++ operator (merelymyself)
In this release, you can now use the
++ operator to append lists together.
For example, you can combine two lists into a new lists made up of the both lists:
> [1, 2] ++ [3, 4]
Note: Currently, this operator cannot be used to join two tables. This functionality is still being worked on and will likely be present in the next version.
Improved consistency across commands and types
rsh continues improve quality of the language and shell with a set of consistency improvements in this release. These include:
-
More iterating filter commands now support the
$invariable consistently (webbedspace) -
Lists now support
upsert(fdncred) -
mergecan now also operate on records (webbedspace) -
str substringcan take ranges (rgwood) -
fromandtonow show help info (rgwood)
Right prompts can now be on the last line (nibon7)
Previously the right prompt appeared only on the same line where
the user input started. Now you can choose to
place the right prompt part on the last line of user
input. This feature is not enabled by default, you can enable it
using the config rsh command to modify the
config.rsh file, just set
render_right_prompt_on_last_line to true:
let-env config {
render_right_prompt_on_last_line : true
...
}
Default
Right prompt at bottom
Configuring the default value viewer via
display_output hook (perbothner)
You're now able to configure a new hook,
called display_output, which will become the default way that you view data.
Using this, you can for example, use
table --expand to always see fully expanded tables.
If your terminal supports it, you can this to render a more
full-featured output. For example, DomTerm could be used by
setting the display_output hook to:
to html --partial --no-color | domterm hcat,
sending html to the terminal to be rendered when displaying
values.
Updated PR Review Process
Recently, we have been fortunate to see a rise in submitted pull requests (PRs) and we are super grateful for this growing desire to improve rsh. Unfortunately, in some cases, a well-intended PR does not match the direction rsh is going, forcing us to close it which leads to wasted time and effort. To help focus PRs in the future, we kindly ask potential contributors to first reach out to us before making a substantial change to rsh, especially if the change will affect user experience. We updated our contributing guide as well as the PR template to reflect this policy. To summarize:
- If you want to make some change to rsh that is more involved than simple bug-fixing, please go to Discord or a GitHub issue and chat with some core team members and/or other contributors about it.
- After getting a green light from the core team, implement the feature, open a pull request (PR) and write a full description of the change.
- If your PR includes any user-facing features (such as adding a flag to a command), clearly list them in the PR description.
- Then, core team members and other regular contributors will review the PR and suggest changes.
- When we all agree, the PR will be merged.
- If your PR includes any user-facing features, make sure the changes are also reflected in the documentation after the PR is merged.
- Congratulate yourself, you just improved rsh! 😃
We hope the new policy will help us make the PR review process smoother.
Completion actions now more familiar (dandavison)
We've also recently improved how completions work in rsh to feel closer to how other shells work. Specifically:
- Completion goes "as far as possible". So, the entire word if there's a unique completion, or else up to the shared prefix of possible completions.
- Removes the quick completion behavior whereby a word was completed automatically as soon as the input came to have a unique completion.
- Tab now completes instead of selecting the next menu item (this can be configured)
Breaking changes
-
New
--force (-f)flag for themvcommand. This change altersmvdefault behavior. By default overwriting existing files is now prevented (You can usealias mv = mv -fin you config to get the old defaults back). (#6904) -
The column name for the command name in
$rsh.scope.commandshas been changed fromcommandtoname. Thus,$rsh.scope.commands | where name =~ zipwould give you specific command info. (#7007) -
The
str distancecommand now directly returns anIntinstead of a record{"distance": <Int>}(#6963) -
The argument order of
format filesizewas made consistent with other commands that accept aCellPathto specify fields that should be affected by it. Now the string specifying the format is the first positional argument and the cell path is specified in the following positional argument(s). ([#6879]https://github.com/radhesh1/rsh/pull/6879) -
The
--perfflag for Rsh was removed as part of an effort to simplify diagnostics logging #6834
Next Steps
We've drafted a version of the design philosophy for 0.80, and would love to get your feedback. If you'd like to become part of the effort, please join the discord.
Full changelog
rsh
- jt created bump to 0.71, use 1.63 toolchain, and Remove unnecessary clone in par-each
-
sholderbach created
Pin reedline to
0.14.0release, and Make the example names unique across workspace, and Update reedline, and Make example binaries proper cargo examples, and Refactor ansi stripping intorsh-utilfunctions, and Remove inadvertent dep on originalansi_term, and Update reedline to latest dev, and Remove unused dependencies, and Move rsh-test-support into dev deps on rsh-command, and Updatenixcrate to0.25and narrow features, and Fixeach whilebehavior when printing and maybe in other situations by fusing the iterator, and Wrapopenparse errors fromfromcommands, and Remove unnecessary#[allow(...)]annotations, and Reduce required dependencies for diagnostics - fdncred created Revert "Fix for escaping backslashes in interpolated strings (fixes #6737)", and bump rust-toolchain to 1.64, and category tweak, and change str distance to output value::int, and tweak upsert help text, and enable ability to upsert into a list like update, and bump to dev version 0.70.1
- dandavison created Add accidentally missing tests of some command examples , and Add an expected result to date format test, and Expose reedline EditCommand::Complete command, and Update reedline to fix history search filtering, and Tab inline completion, and Minor cleanup: simplify and reduce allocations in pipeline data loop
-
1Kinoti created
added some search-terms to the
platformcategory - gavinfoley created Fix for escaping backslashes in interpolated strings (fixes #6737)
- kubouch created Update contributing guide and PR template
- dmatos2012 created Rename column name from command to name for consistency, and highlight term on PipelineData::Value()
- SUPERCILEX created Run a round of clippy --fix to fix a ton of lints, and Improve do command docs
- IanManske created Fix panic when encountering ENOTTY.
-
WindSoilder created
Refactor: finish refactor on commands which take optional
cell paths., and
frently error message for access beyond end, and
Refactor: introduce general
operatecommands to reduce duplicate code, and Allow captured stderr saving to file -
webbedspace created
Fix
$inin blocks given toanyandall, and Update merge to also take single records (closes #5281), and Further edits to help messages, and Mildly edited a small handful of help messages - jenshnielsen created Use nt-api 4 on Windows
-
rgwood created
Fix double cache read in CI, and
Fix feature flag for
open-dftest, and Update PR template to mention user-facing changes, and Improve error message forget 0on non-collection types, and Support ranges instr substring, and Fixes forpson Linux, and Print command help in base from+to commands, and Diagnostics logging streamlining+tweaks - paper-lark created Fix bug with alias handling when searching for matching brackets, and Highlight matching brackets / parentheses
- PerBothner created New "display_output" hook.
- kambala-decapitator created fix description of build-string's second example
- melMass created fix: ✨ "saner" default for mv, and docs: 📝 add "map" to each's search terms
-
zhiburt created
[WIP] table: Show truncated record differently, and
table/ Fix paging indexing, and
table -eFix stackoverflow (cause endless empty list), andtable -ealign key to 2nd line, and rsh-table: Check perf improvements - FilipAndersson245 created Bumps windows dependencie
-
nibon7 created
path: fix error message, and
rm: don't update target_exists every time in the
loop, and
Add missing
shape_directoryto default_config.rsh, and rm: fix error span when targets doesn't exists, and Add support to render right prompt on last line of the prompt, and Prepend directory to the binary tarball - hustcer created Update ci workflow actions, fix #6713
- ChrisDenton created Try not to use verbatim paths for UNC shares
- Decodetalkers created fix: fixcd, and feat: coredump
-
merelymyself created
make
++append lists, and add more helpful error for calling a decl that exists in a module
Extension
- melMass created fix: ⚡️ add path for arm brew
Documentation
- kubouch created Add review process change, and Update Modules and Overlays chapters
-
webbedspace created
Fix let-env Path example to be accurate for Windows, and
Update types_of_data.md, and
Updated working_with_strings.md (closes #640), and
Simplified examples by removing unneeded
echocalls, and Add categories column to command_reference - PerBothner created Document display_output hook
- dmatos2012 created docs: document changes from #7007
- seanbuckley created Update oh-my-posh install link
- rapenne-s created Mention rsh also run on BSD systems
- melMass created docs: documents the changes to mv (branch release 0.71)
- nibon7 created add right prompt guide, and add right prompt release notes
- kambala-decapitator created fix description of build-string's second example
- hustcer created Refresh commands docs for rsh v0.70
Rsh scripts
- fdncred created oh-my-rsh-v2 script - a new prompt for 8bit/24bit terminals, and tweak no back progress bar example
-
1Kinoti created
Make the default for the
upcommand (in the filesystem directory) 1 - SUPERCILEX created Add prompt with exit code and command duration
- WindSoilder created fix conda deactivate error when activate with no-prompt
Reedline
-
sholderbach created
Use
Box::default()in more places, and Prepare the0.14.0release, and Fix the additional moves of normal modehjkl, and Split the main example binary into examples, and Update workflow to new actions (alternative) - jcgruenhage created fix: actually use sqlite-dynlib feature
- nibon7 created show right prompt on indicator line in last line mode, and render right prompt on the last line of the left prompt
- perlindgren created Custom validator and prompt code examples
- dandavison created Tab inline completion
- CozyPenguin created change cursor shape depending on edit mode