aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands
diff options
context:
space:
mode:
authoramaihoefner2022-05-11 01:18:45 +0000
committerGitHub2022-05-11 01:18:45 +0000
commita5bc69c2b5c6821129b635227e9f152e92f08ddc (patch)
tree083e8bc7e2493a5be88dc6d3ac1c5fafbcb87de6 /helix-term/src/commands
parent0477d0289476c34e6b4d11a28165fee0c49063b3 (diff)
feat(commands): add log-open command (#2422)
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r--helix-term/src/commands/typed.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index 68b64bb8..74ab73be 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -1146,6 +1146,15 @@ fn open_config(
Ok(())
}
+fn open_log(
+ cx: &mut compositor::Context,
+ _args: &[Cow<str>],
+ _event: PromptEvent,
+) -> anyhow::Result<()> {
+ cx.editor.open(helix_loader::log_file(), Action::Replace)?;
+ Ok(())
+}
+
fn refresh_config(
cx: &mut compositor::Context,
_args: &[Cow<str>],
@@ -1648,6 +1657,13 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
completer: None,
},
TypableCommand {
+ name: "log-open",
+ aliases: &[],
+ doc: "Open the helix log file.",
+ fun: open_log,
+ completer: None,
+ },
+ TypableCommand {
name: "pipe",
aliases: &[],
doc: "Pipe each selection to the shell command.",