Skip to content

Tags: rammie/rsh

Tags

0.1.3

Toggle 0.1.3's commit message
Bump version to 0.1.3, update prime text for multi-line support and p…

…reference hint

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

0.1.2

Toggle 0.1.2's commit message
Use BRE regex flavor in sed builtin to match GNU sed behavior

Adds a BRE-to-ERE translator so that regex address patterns behave like
GNU sed: bare parens/braces/pipes are literal, escaped versions are
metacharacters. Fixes `/^);/p` being rejected as "unopened group" and
`/function()/p` not matching literal parens.

Bumps version to 0.1.2.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

0.1.1

Toggle 0.1.1's commit message
Bump version to 0.1.1, add pre-commit hook, apply cargo fmt

Add git_hooks/pre-commit running cargo fmt --check and cargo test.
Apply cargo fmt formatting across the codebase.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

0.1.0

Toggle 0.1.0's commit message
Remove --prime claude subcommand

--prime no longer accepts a claude argument. Use --install claude
to set up Claude Code integration (MCP server + SessionStart hook).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

0.0.9

Toggle 0.0.9's commit message
Add MCP stdio server and --install claude for native Claude Code inte…

…gration

rsh can now run as an MCP server (`rsh --mcp`), exposing a single `rsh`
tool over JSON-RPC 2.0 stdio transport. This lets Claude Code use rsh
directly as a tool without wrapping it in bash. `rsh --install claude`
writes/merges .mcp.json at the project root to register the server.

New files: src/mcp.rs, src/install.rs, tests/mcp_tests.rs (17 tests).
Refactors: extracted parse_and_execute(), resolve_working_dir(), and
prime_text() as shared helpers to eliminate duplication between CLI
and MCP code paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

0.0.8

Toggle 0.0.8's commit message
Strip LD_PRELOAD/DYLD vars in --inherit-env, add substitution depth g…

…uard

Security hardening from audit:

- Strip LD_PRELOAD, LD_LIBRARY_PATH, LD_AUDIT, DYLD_INSERT_LIBRARIES,
  DYLD_FRAMEWORK_PATH, DYLD_LIBRARY_PATH even in --inherit-env mode to
  prevent arbitrary code injection via dynamic linker
- Add substitution depth cap (16) in both validator and executor to
  prevent stack overflow from deeply nested $(...) (DoS)
- Return error for arithmetic expansion $((...)) instead of silent empty
- Add test coverage for sed path traversal, input redirects, compound
  redirects, and nested command substitution

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

0.0.7

Toggle 0.0.7's commit message
Bump version to 0.0.7, fix flaky grep -f test

- Bump version from 0.0.6 to 0.0.7
- Fix test_concatenated_flag_relative_path_allowed: Cargo.toml contains
  version strings (e.g. "0.3") that grep interprets as invalid character
  ranges when used as a pattern file. Use controlled test files instead.
- Update mise.toml tooling

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

0.0.6

Toggle 0.0.6's commit message
Add --prime claude hook installer and --version flag

Adds `rsh --prime claude` to install rsh as a Claude Code SessionStart
hook in .claude/settings.local.json, with git root detection, dedup,
and preservation of existing settings. Adds --version/-V flag. Bumps
edition to 2024 and version to 0.0.6.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

0.0.5

Toggle 0.0.5's commit message
Add built-in restricted sed for safe line extraction

Implement sed as an in-process builtin that only supports -n with
address+p (e.g. sed -n '10,20p' file). No sed binary is executed,
eliminating the risk of sed's e (execute), w (write), s///e, and -i
features. Supports single lines, ranges, $ (last line), multiple
expressions via semicolons or -e, multiple files, and stdin pipelines.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

0.0.4

Toggle 0.0.4's commit message
Allow safe redirects (2>/dev/null, 2>&1) on non-final pipeline commands

Previously, all redirects on non-final pipeline stages were rejected,
breaking common patterns like `grep -r pattern . 2>/dev/null | head`.
Now only unsafe redirects (file writes) are blocked mid-pipeline while
fd duplication and /dev/null writes are allowed anywhere.

Also adds xargs alternative example to --prime LLM guidance.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>