andrewchambers / bupstash

Easy and efficient encrypted backups.
https://bupstash.io
MIT License
898 stars 31 forks source link

Change CLI args for tags #389

Open piegamesde opened 1 year ago

piegamesde commented 1 year ago

Currently tags are parsed as positional arguments, before paths. As this might be ambiguous, the special argument :: is used to separate both, although it is optional. I am not a fan of this design for multiple reasons. Mainly, I am scared of accidentally mixing things up and then getting silent misbehavior of the application. But also the special :: argument is confusing, as it is similar but not identical to the -- convention which separates optional from positional arguments. (I don't know whether bupstash makes use of that convention already, if not then it probably should but that's another issue.)

Instead, I'd like to see tags added with the optional argument --tag, which can then be specified multiple times. This is more typing effort, but IMO it is worth the general improvement. Alternatively, one could have --tags with a comma separate list of tag values to save some typing, although this would only work for tags which don't contain a comma (i.e. most)