add CLI option to only show actions taken
The current CLI supports both:
-
-q- quiet -
-Q- really-quiet
What I would find really useful is an option to print only actions taken. If no action taken (e.g. link already exists), then output nothing. I'm open to any alternative for the name of the option(s), but I'd suggest something like
-a, --actionable show only output when actions are taken
e.g.
$ dotbot --actionable
Creating link ~/bin -> .conf/bin
Removing ~/.bashrc
Creating link ~/.bashrc -> .dot/bashrc
That way, you get the best of -Q and yet only show results when anything actually changed. This avoids the, IMO, extraneous lines such as
Link exists ~/.conf -> Projects/conf
and the boilerplate:
All links have been set up
All targets have been cleaned
==> All tasks executed successfully
I'm not at all sure how this would work with various plug-ins, and obviously there would be some overlap in work related to the idea of a --dryrun option (#236)
... I should add that I'm happy to provide a PR if this seems useful to others. Input welcome on the option names as well as tips for how to make this happen in a style you'd like.
I like this idea. What do you think about just making this the default behavior? Or even if not the default, just changing the behavior of -q / --quiet to do what you proposed?
I think changing exactly is printed to the console shouldn't break anyone's workflows -- hopefully they are not depending on the contents of stdout when running dotbot.
I think we already have too many options for verbosity level, there's -v, none, -q, and -Q, so I'd prefer not to add another one.
Personally, I'd be in favor of my suggested behavior being the default, and then -v | --verbose gets you what is currently the default. -Q would become obsolete and subsumed by -q | --quiet.
Even though I see how others might find that a dramatic change, I would be surprised if many are / anyone is relying upon the output of dotbot in some pipeline for non-human consumption.
So, if you, @anishathalye, are willing to make that change in default behavior, I'm fine with it as well. Just to be clear, EVERY plug-in has to abide by this definition as well.
As I mentioned in other issue, you have a reason or desire to work on this yourself, or do you prefer a PR?
I can work on this one myself. Might ask you to take a look once I have a patch.