Open niklasberglund opened 7 years ago
I'm curious what would user expect when one pass in conflicting flags; warning and go on with some default, or error and quit?
Yea that's an issue. One way to avoid this issue could be for example:
macdown --hide-editor --show-preview
Could instead be:
macdown --show-preview-only
Common practices:
--editor-only --preview-only
shows the preview, ignoring --editor-only
)First approach may be easier? I love second approach, where #350 can be (partially) solved by alias macdown='macdown --editor-only'
.
The utility uses a argument parsing library. I don’t remember the internals, but if it works like Python’s argparse
module (which I am familiar with), option 2 would not be much more complicate than option 1. I also like option 2 better, but that’s not universal preference.
I get the command line stuff but can these options just be added contextually to the existing "Layout" toolbar dropdown?
Thinking of implementing this and creating a PR but want to check first whether you also think the functionality makes sense. I'd like to implement pane options for the
macdown
shell utility. Flags such as--hide-editor
etc. Maybe flags for all the pane-related options under the View menu in MacDown:That would probably cover what's requested in #350. Not sure whether they're asking for a setting in the preferences or options for the
macdown
tool but I think command line options is the way to go.