From 2da819581158f27b8c9410d83f03e63a4a8c334d Mon Sep 17 00:00:00 2001 From: Tal Wrii Date: Tue, 21 Jan 2025 12:15:32 +0100 Subject: [PATCH] remove prefixes from command IDs and tweak names --- src/main.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.ts b/src/main.ts index afe5027..2b86c1c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -339,7 +339,7 @@ export default class ReplPlugin extends Plugin { addCommands() { this.addCommand({ - id: 'repl-enter', + id: 'eval', name: 'Execute the current line or selection', editorCallback: (editor: Editor, view: MarkdownView) => { try { @@ -362,8 +362,8 @@ export default class ReplPlugin extends Plugin { }); this.addCommand({ - id: 'repl-exec', - name: 'Execute run like or selection (no result)', + id: 'exec', + name: 'Execute current line or selection (without printing result)', editorCallback: (editor: Editor, view: MarkdownView) => { const cursor = editor.getCursor() const region = editor.getSelection() || editor.getLine(cursor.line) @@ -372,8 +372,8 @@ export default class ReplPlugin extends Plugin { }); this.addCommand({ - id: 'repl-prompt-exec', - name: 'Read some JavaScript and run it', + id: 'prompt-exec', + name: 'Read some JavaScript and run it (result shown as Notification)', editorCallback: async (editor: Editor, view: MarkdownView) => { const command = await promptCommand(this.app, this.history, editor) message(this.runCommand(editor, view, command))