Skip to content

Create a secret GitHub gist from the previewed file #325

Description

@jongio

Sharing a single file today means leaving grut, opening a browser, and pasting. Add a way to push the previewed file straight to a secret GitHub gist and copy the resulting URL to the clipboard.

Add a Ctrl+G keybinding in the preview that creates a secret gist from the current on-disk file using the gh CLI, then copies the gist URL and shows a toast.

Acceptance criteria:

  • Ctrl+G in the preview creates a secret gist from the current file and copies its URL.
  • No-op with a clear toast when the preview isn't showing an on-disk file.
  • Errors from gh surface as an error toast; success shows the gist URL.
  • Keybinding registered in the panel, the keybindings manifest, and the help overlay.
  • Unit tests cover argument building and the non-file guard (no real gist created in tests).

Metadata

Metadata

Assignees

Labels

ideaFeature idea from the idea pipeline

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions