min icon indicating copy to clipboard operation
min copied to clipboard

Updates to command-line arguments

Open flightmansam opened this issue 2 years ago • 2 comments

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).

flightmansam avatar Jun 14 '22 03:06 flightmansam

Sorry I have done nothing more on this topic! Not a very high priority for me at the moment ahah.

flightmansam avatar Aug 22 '22 05:08 flightmansam

No worries!

PalmerAL avatar Aug 23 '22 15:08 PalmerAL