From cdca907c75e98b45c3bf956c16240a6928d0f9e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Thu, 22 Oct 2026 23:20:31 +0200 Subject: [PATCH] Copy the shortcut result with pbcopy --- src/shortcuts.ts | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/src/shortcuts.ts b/src/shortcuts.ts index 48d0bf6..7eaab52 100644 --- a/src/shortcuts.ts +++ b/src/shortcuts.ts @@ -30,12 +30,14 @@ function shellCommand(language: Language, { bin, printWidth, sqlDialect }: Comma if (printWidth !== undefined) parts.push(`--print-width=${printWidth}`); if (sqlDialect && language.startsWith("sql")) parts.push(`--sql-dialect=${sqlDialect}`); + // Shortcuts turns a script result that looks like JSON into a dictionary and loses the format. + parts.push("|", "pbcopy"); + return parts.join(" "); } function shortcutPlist(name: string, command: string): string { const scriptUUID = randomUUID().toUpperCase(); - const clipboardUUID = randomUUID().toUpperCase(); return ` @@ -79,29 +81,6 @@ function shortcutPlist(name: string, command: string): string { ${scriptUUID} - - WFWorkflowActionIdentifier - is.workflow.actions.setclipboard - WFWorkflowActionParameters - - UUID - ${clipboardUUID} - WFInput - - Value - - OutputName - Shell Script Result - OutputUUID - ${scriptUUID} - Type - ActionOutput - - WFSerializationType - WFTextTokenAttachment - - -