@@ -1741,13 +1741,30 @@ fn insert_output(
1745+ cx: &mut compositor::Context,
1747+ event: PromptEvent,
1748+) -> anyhow::Result<()> {
1749+ pipe_impl(cx, args, event, &ShellBehavior::Ignore)
1744fn pipe(cx: &mut compositor::Context, args: &[Cow<str>], event: PromptEvent) -> anyhow::Result<()> {
1752fn pipe(cx: &mut compositor::Context, args: &[Cow<str>], event: PromptEvent) -> anyhow::Result<()> {
1753+ pipe_impl(cx, args, event, &ShellBehavior::Replace)
1757+ cx: &mut compositor::Context,
1759+ event: PromptEvent,
1760+ behavior: &ShellBehavior,
1761+) -> anyhow::Result<()> {
1745 if event != PromptEvent::Validate {
1762 if event != PromptEvent::Validate {
1746 return Ok(());
1763 return Ok(());
1749 ensure!(!args.is_empty(), "Shell command required");
1766 ensure!(!args.is_empty(), "Shell command required");
1750− shell(cx, &args.join(" "), &ShellBehavior::Replace);
1767+ shell(cx, &args.join(" "), behavior);
@@ -2292,6 +2309,13 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
2292 fun: pipe,
2309 fun: pipe,
2293 completer: None,
2310 completer: None,
2315+ doc: "Pipe each selection to the shell command, ignoring output.",
2295 TypableCommand {
2319 TypableCommand {
2296 name: "run-shell-command",
2320 name: "run-shell-command",
2297 aliases: &["sh"],
2321 aliases: &["sh"],