Skip to content

Copy the shortcut result with pbcopy - #5

Merged
raszi merged 1 commit into
mainfrom
fix-json-shortcut
Oct 22, 2026
Merged

raszi merged 1 commit into
mainfrom
fix-json-shortcut

Conversation

@raszi

@raszi raszi commented Oct 22, 2026

Copy link
Copy Markdown
Member

The "Format JSON" shortcut did not put the formatted JSON on the clipboard.

Shortcuts reads the result of the shell script. If the result looks like JSON, Shortcuts turns it into a dictionary. The "Copy to Clipboard" action then copies the dictionary only as public.json, and most apps cannot paste it. A JSON list causes an error.

The shortcut script now sends the result to pbcopy, and the shortcut has no "Copy to Clipboard" action. The format-code command still writes to stdout.

@raszi
raszi merged commit a18b11a into main Oct 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant