@@ -1172,6 +1172,26 @@ fn refresh_config(
11721172 Ok(())
11731173}
11741174
1175+fn append_output(
1176+ cx: &mut compositor::Context,
1177+ args: &[Cow<str>],
1178+ _event: PromptEvent,
1179+) -> anyhow::Result<()> {
1180+ ensure!(!args.is_empty(), "Shell command required");
1181+ shell(cx, &args.join(" "), &ShellBehavior::Append);
1182+ Ok(())
1183+}
1184+
1185+fn insert_output(
1186+ cx: &mut compositor::Context,
1187+ args: &[Cow<str>],
1188+ _event: PromptEvent,
1189+) -> anyhow::Result<()> {
1190+ ensure!(!args.is_empty(), "Shell command required");
1191+ shell(cx, &args.join(" "), &ShellBehavior::Insert);
1192+ Ok(())
1193+}
1194+
11751195fn pipe(
11761196 cx: &mut compositor::Context,
11771197 args: &[Cow<str>],
@@ -1671,6 +1691,20 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
16711691 fun: open_log,
16721692 completer: None,
16731693 },
1694+ TypableCommand {
1695+ name: "insert-output",
1696+ aliases: &[],
1697+ doc: "Run shell command, inserting output after each selection.",
1698+ fun: insert_output,
1699+ completer: None,
1700+ },
1701+ TypableCommand {
1702+ name: "append-output",
1703+ aliases: &[],
1704+ doc: "Run shell command, appending output after each selection.",
1705+ fun: append_output,
1706+ completer: None,
1707+ },
16741708 TypableCommand {
16751709 name: "pipe",
16761710 aliases: &[],