min
min copied to clipboard
Updates to command-line arguments
Discussed in https://github.com/minbrowser/min/discussions/2008.
I would like to add a -t
argument to request specific tasks from the command-line. This may be an opportunity to look at the code structure of how min handles command-line arguments to avoid confusion, inadvertent bugs, and easier extension later on. One opportunity could be to use a specific library like commander.js.
This branch has some uglies at the moment due to my agile desire to just have the feature I want:
- I use the searchAndSortTasks and moveToTaskCommand from customBangs.js, so this should be separated out (probably to task.js @PalmerAL?)
- BrowserUI ipc 'switchToTask' and BrowserUI.addTab() share commonality so it should be separated out?
- Currently the -t argument tries to handle both a task name or a task id by doing an "is all digits?" comparison. Probably should eliminate this ambiguity by having a switch for a task id (maybe --task-id)
- Would like to have a command line way of switching to a particular tab (maybe -tab, and changing -t to be -task).
Sorry I have done nothing more on this topic! Not a very high priority for me at the moment ahah.
No worries!