Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] how to get command id #664

Open
xsevy opened this issue Mar 24, 2024 · 4 comments
Open

[FEATURE REQUEST] how to get command id #664

xsevy opened this issue Mar 24, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@xsevy
Copy link

xsevy commented Mar 24, 2024

Not sure this is a request because it might be that there's such a feature.
I use quickadd and meta bind. I would like to make a button that would trigger a quick add action.

style: primary
label: abcdef
id: add-record-button
action:
  type: command
  command: [command]
@xsevy xsevy added the enhancement New feature or request label Mar 24, 2024
@chhoumann
Copy link
Owner

Hi @xsevy

If you use app.commands.listCommands().filter(c => c.id.includes('choice')) in the developer tools console, you can see all the command IDs.

For example:
image

You can open the developer tools with CTRL+SHIFT+i. CMD instead of CTRL if you're on Mac.

Hope this helps!

@chhoumann
Copy link
Owner

You can get slightly better formatting if you use this:

console.table(app.commands.listCommands().filter(c => c.id.includes('choice')))

image

@chhoumann
Copy link
Owner

As for whether this is a feature, it might be useful to add a 'Copy ID' button somewhere :)

@ces3001
Copy link

ces3001 commented Jun 13, 2024

QuickAdd might not, but Meta Bind has such a command:
Cmd/Ctrl-P to open the command palette: Meta Bind: Select and Copy Command ID aka obsidian-meta-bind-plugin:copy-command-id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants