From a5bc69c2b5c6821129b635227e9f152e92f08ddc Mon Sep 17 00:00:00 2001 From: amaihoefner Date: Wed, 11 May 2022 03:18:45 +0200 Subject: feat(commands): add log-open command (#2422) --- helix-term/src/commands/typed.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'helix-term/src/commands') 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], + _event: PromptEvent, +) -> anyhow::Result<()> { + cx.editor.open(helix_loader::log_file(), Action::Replace)?; + Ok(()) +} + fn refresh_config( cx: &mut compositor::Context, _args: &[Cow], @@ -1647,6 +1656,13 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[ fun: open_config, completer: None, }, + TypableCommand { + name: "log-open", + aliases: &[], + doc: "Open the helix log file.", + fun: open_log, + completer: None, + }, TypableCommand { name: "pipe", aliases: &[], -- cgit v1.2.3-70-g09d2