copier icon indicating copy to clipboard operation
copier copied to clipboard

bug: default boolean not displayed in questionnaire

Open RoyalTS opened this issue 4 years ago • 3 comments

I have a variable defined in copier.yml like so:

private:
  type: bool
  default: true

Yet, despite the default value being set that default value is not displayed in the questionnaire:

private? Format: bool
🎤? [Y/n]

RoyalTS avatar May 04 '21 17:05 RoyalTS

Oooooh, I see now that the way the default is rendered is by capitalizing the Y! That's very subtle. Color that value for added emphasis perhaps?

RoyalTS avatar May 04 '21 17:05 RoyalTS

It's the standard way of showing defaults in POSIX (or something) :slightly_smiling_face: EDIT: probably just a convention and nothing to do with POSIX You'll notice that in many other tools, the default value is capitalized. I've became used to it so I know instantly what is the default when seeing this. Of course if you don't know it, you don't know it :smile: Can't find the source of truth, but here's a comment: https://stackoverflow.com/questions/226703/how-do-i-prompt-for-yes-no-cancel-input-in-a-linux-shell-script#comment99369566_226703

pawamoy avatar May 04 '21 17:05 pawamoy

Who am I to disagree with convention... I'd still lobby for something less subtle – I, for one, was too ignorant to know of the convention and I've been around the block a few times. But feel free to close if you disagree.

RoyalTS avatar May 05 '21 15:05 RoyalTS