md
Synopsis
Section titled “Synopsis”md [-r] [--foreground] [marktext-args...] [FILE...]Description
Section titled “Description”Opens files in MarkText, detached from the terminal so the shell stays usable and the editor survives closing the window that launched it.
Every argument is forwarded to marktext untouched except the two flags below, which md consumes itself. marktext’s own flags (--new-window, --safe, --disable-gpu, …) therefore work exactly as documented in marktext --help.
Flags whose entire purpose is terminal output – --version, -v/--verbose and --debug – imply --foreground, since backgrounding them would send the output you asked for to /dev/null.
--read-only sandboxes the editor with firejail so saving fails instead of overwriting the file. MarkText has no read-only mode of its own.
Arguments
Section titled “Arguments”FILE... |
Markdown files to open |
-r, --read-only |
Open sandboxed, with every named file bound read-only |
--foreground |
Run in the foreground; do not detach |
-h, --help |
Show this help message |
Exit Status
Section titled “Exit Status”0 |
MarkText launched (or, with --foreground, exited successfully) |
1 |
--read-only was requested without firejail or without an existing file |
This file is autoloaded, so it never shadows an md function or alias defined elsewhere – fish only looks here when nothing named md exists. A real md binary would be shadowed, so md hands off to it verbatim whenever marktext is not installed.
Example
Section titled “Example”md README.mdmd --read-only NOTES.mdmd --foreground --debug draft.mdmd --new-window one.md two.mdDependencies: marktext, firejail, bkg
Classification: uses-shadow(mkdir)