|
|
@ -1172,6 +1172,26 @@ fn refresh_config(
|
|
|
|
Ok(())
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn append_output(
|
|
|
|
|
|
|
|
cx: &mut compositor::Context,
|
|
|
|
|
|
|
|
args: &[Cow<str>],
|
|
|
|
|
|
|
|
_event: PromptEvent,
|
|
|
|
|
|
|
|
) -> anyhow::Result<()> {
|
|
|
|
|
|
|
|
ensure!(!args.is_empty(), "Shell command required");
|
|
|
|
|
|
|
|
shell(cx, &args.join(" "), &ShellBehavior::Append);
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn insert_output(
|
|
|
|
|
|
|
|
cx: &mut compositor::Context,
|
|
|
|
|
|
|
|
args: &[Cow<str>],
|
|
|
|
|
|
|
|
_event: PromptEvent,
|
|
|
|
|
|
|
|
) -> anyhow::Result<()> {
|
|
|
|
|
|
|
|
ensure!(!args.is_empty(), "Shell command required");
|
|
|
|
|
|
|
|
shell(cx, &args.join(" "), &ShellBehavior::Insert);
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn pipe(
|
|
|
|
fn pipe(
|
|
|
|
cx: &mut compositor::Context,
|
|
|
|
cx: &mut compositor::Context,
|
|
|
|
args: &[Cow<str>],
|
|
|
|
args: &[Cow<str>],
|
|
|
@ -1671,6 +1691,20 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
|
|
|
|
fun: open_log,
|
|
|
|
fun: open_log,
|
|
|
|
completer: None,
|
|
|
|
completer: None,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
TypableCommand {
|
|
|
|
|
|
|
|
name: "insert-output",
|
|
|
|
|
|
|
|
aliases: &[],
|
|
|
|
|
|
|
|
doc: "Run shell command, inserting output after each selection.",
|
|
|
|
|
|
|
|
fun: insert_output,
|
|
|
|
|
|
|
|
completer: None,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
TypableCommand {
|
|
|
|
|
|
|
|
name: "append-output",
|
|
|
|
|
|
|
|
aliases: &[],
|
|
|
|
|
|
|
|
doc: "Run shell command, appending output after each selection.",
|
|
|
|
|
|
|
|
fun: append_output,
|
|
|
|
|
|
|
|
completer: None,
|
|
|
|
|
|
|
|
},
|
|
|
|
TypableCommand {
|
|
|
|
TypableCommand {
|
|
|
|
name: "pipe",
|
|
|
|
name: "pipe",
|
|
|
|
aliases: &[],
|
|
|
|
aliases: &[],
|
|
|
|