Open jacobmischka opened 7 years ago
Great suggestion. It should also display better error messages.
Not the ideal location to put this, but I couldn't find a better one:
On Windows, starting an existing file requires a bit more work, at least to make it robust w.r.t. version updates. The Abricotine shortcut on Windows actually calls the updater, which in turn starts Abricotine. This is probably done to check for updates at startup, and to be robust to version changes, as Abricotine.exe seems to be located in a directory with a version number in its name. E.g., in my case, app-0.4.0/Abricotine.exe
.
If you want to open a specific file when starting Abricotine, (copy and) append the following to the 'target' field of the existing Abricotine start menu shortcut:
--process-start-args "/path/to/file.md"
For example, the resulting shortcut target could be:
C:\Users\<user>\AppData\Local\Abricotine\Update.exe --processStart "Abricotine.exe" --process-start-args "C:\Users\<user>\Documents\file.md"
This took me some time to figure out, and might be useful to others.
@tjallingran This is because Abricotine installer is created with Squirrel.Windows. Thank you for the trick which I didn't know, though. I'll update the documentation... or maybe directly update to the latest version of Squirrel which is obviously not using Update.exe anymore: #152.
@brrd Yeah, maybe I should have mentioned that I found the --process-start-args
flag in the Squirrel code, here. So I thought as much, although I'm totally not familiar with Squirrel and didn't realize that it is not used in the Linux version of Abricotine.
Their decision to change from using Update.exe to a "dummy" executable (#152) definitely seems like a good choice.
While abricotine works great when trying to open an existing file from the command line, it does not like trying to create one that doesn't already exist. It would be really great if running
abricotine test.md
would createtest.md
if it can't open it.Thanks! I'm really liking using Abricotine to take notes in markdown, this is a great markdown editor.