Skip to content

Problems with args choice based actions shortcuts & search #1600

@slavik-chapelskyi

Description

@slavik-chapelskyi

I have a script that lists my projects with the ability to open them in multiple places using CMD+K actions.

In my case, the actions are built dynamically based on the projects I fetch from an external resource, so I create them as part of arg({choices[x].actions}).

  1. The first problem appears with the shortcuts, which do not work by default until you open the actions with CMD+K for the first time. After that, you can trigger an action with a hotkey without opening the actions menu. This also works fine when defining actions as the 3rd argument of arg (which lacks the ability to build actions based on the choice data).

  2. I'm not sure if this is a bug or a feature request. The fuzzy search inside the actions is not working correctly. For example, it fails to find git* or ci*.

Script example

// Name: action bug test

import "@johnlindquist/kit";

await arg({
  choices: [
    {
      name: "First",
      value: "first",
      actions: [
        {
          name: "Open in github",
          shortcut: "cmd+g",
          async onAction() {
            console.log("Opening git.");
          },
        },
        {
          name: "Open in circleci",
          shortcut: "cmd+c",
          async onAction() {
            console.log("Opening circleci.");
          },
        },
      ],
    },
  ],
});

CleanShot.2025-08-14.at.19.27.18.mp4

PS: I am using ScriptKit 3.45.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions