Watson icon indicating copy to clipboard operation
Watson copied to clipboard

Split one tag into multiple via `rename`

Open addisonklinke opened this issue 3 years ago • 0 comments

Say I create a frame

watson start personal +lunch
watson stop
watson log

Wednesday 23 March 2022 (10m 04s)
	f4beec9  07:27 to 07:38      10m 04s      personal  [lunch]

Now I have several of these over the past two weeks. I decide I want the tags to be [meals, lunch] instead of just [lunch]. Currently watson rename only supports [lunch] --> [meals] but doesn't have append a meals tag everywhere there is a lunch one. I've tried

watson rename tag lunch "meals, lunch"        # Looks okay in log, but JSON is wrong so reports would be off
watson rename tag lunch '"meals", \n"lunch"'  # Garbled JSON, bad idea

Aside from using the frame hashes from log to do watson edit [hash] for everything manually, is there some way this kind of operation could be supported within rename? Perhaps the following could clarify single tag vs. multiple

watson rename tag lunch "[meals, lunch]"

Here brackets mean "interpret elements as a list of tags to replace lunch with"

addisonklinke avatar Mar 23 '22 18:03 addisonklinke