Skip to content

Support --open on Linux via xdg-open/open#7

Open
alcarraz wants to merge 1 commit into
ar:mainfrom
alcarraz:open-support-linux
Open

Support --open on Linux via xdg-open/open#7
alcarraz wants to merge 1 commit into
ar:mainfrom
alcarraz:open-support-linux

Conversation

@alcarraz

Copy link
Copy Markdown
Contributor

Summary

  • --open currently only opens the generated PDF on macOS (open), silently doing nothing elsewhere
  • Adds Linux support: prefers xdg-open, falls back to open if present
  • --yoink is left untouched (macOS-only, no Linux equivalent)
  • If neither open nor xdg-open is found, a warning is only printed with --info, to keep default behavior unchanged when nothing can be opened

Test plan

  • bash -n bin/memo passes
  • ./bin/memo --open memomemo.md on Linux successfully opens the PDF via xdg-open
  • macOS open path and --yoink behavior unchanged

--open only worked on macOS since it was gated behind a Darwin check.
Now it also opens the PDF on Linux using xdg-open, falling back to
open if present. --yoink stays macOS-only since Yoink has no Linux
equivalent. If neither open command is found, a warning is only
printed with --info to keep default behavior unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant