Terminal metadata idea from this #1 comment.
- Should we have a parent object (eg
CLI.terminal.noColor) or bare in the namespace (eg CLI.noColor)?
- Functions (eg
CLI.terminal.noColor()) or getters (eg CLI.terminal.noColor)?
- Interactivity:
- Potential names:
interactive, isInteractive, interactivity, nonInteractive, notInteractive, tty, isTty, isTTY, terminal, isTerminal, inTerminal
- Deno used to have a
isatty(...) function, but now is moving to isTerminal.
- No color:
- Potential names:
noColor, color, colorful, hasColor, shouldColor
- We should probably just use
noColor as it is essentially an opt-out preference; color could imply the user wants color which could not be true (rather than NO_COLOR stating the user explicitly does not want color). Also, this would then share the name of the environment variable "standard".
- Only Deno exposes just this (
Deno.noColor) afaik, other runtimes you have to handle it yourself (eg !!process.env.NO_COLOR).
Terminal metadata idea from this #1 comment.
CLI.terminal.noColor) or bare in the namespace (egCLI.noColor)?CLI.terminal.noColor()) or getters (egCLI.terminal.noColor)?interactive,isInteractive,interactivity,nonInteractive,notInteractive,tty,isTty,isTTY,terminal,isTerminal,inTerminalisatty(...)function, but now is moving toisTerminal.noColor,color,colorful,hasColor,shouldColornoColoras it is essentially an opt-out preference;colorcould imply the user wants color which could not be true (rather thanNO_COLORstating the user explicitly does not want color). Also, this would then share the name of the environment variable "standard".Deno.noColor) afaik, other runtimes you have to handle it yourself (eg!!process.env.NO_COLOR).