gotz icon indicating copy to clipboard operation
gotz copied to clipboard

Treat empty argument as `true`

Open danielwerg opened this issue 1 year ago • 4 comments

gotz --live

Should be equivalent to

gotz --live true

Is there a reason it isn't?

danielwerg avatar Feb 28 '25 01:02 danielwerg

~Just noticed that --inline is defaults to false, but there was no mention of that in --help.~

danielwerg avatar Feb 28 '25 01:02 danielwerg

Never mind, apparently config is updated with the latest values from cli. Weird behavior, is there a way to prevent this?

danielwerg avatar Feb 28 '25 02:02 danielwerg

Never mind, apparently config is updated with the latest values from cli. Weird behavior, is there a way to prevent this?

Yeah, I think for most people the current behavior is quite weird. Give me some time to get back to this and find a revision.

What do you think about introducing a config sub-command? E.g., it would let the user configure live mode to be set by default like this:

gotz config --live

So that this would set the live mode only once:

gotz --live

This is unfortunately breaking behavior, which I would hate to do, but I also understand that for most people the current behavior may be quite confusing. 😬

merschformann avatar Mar 01 '25 23:03 merschformann

Ah, I just noticed that our intuitions are in line as you already wrote in #26. 😅

Give me some time to find time to work on this. At this point, I want to move to Cobra, which I ignored at the start as it felt oversized for this one-off project. What a fool I was. 😅

Oh, and also agreed on having proper flags like --live from then on, as they won't be sticky config values anymore. 😊

merschformann avatar Mar 01 '25 23:03 merschformann