Explicit escape codes is problematic when using any terminal that isnt' fully compatible with the xterm control codes, and doesn't allow me to turn those codes off by setting TERM to dumb.
Far too many times have I redirected output from a program to a file only be be bombarded with escape codes, breaking grep and other tools that process the output.
Not to mention the fact that using terminfo is much easier than manually outputting the control codes.
Strong disagree. I already know many control codes by heart and can write them inside the printf strings. For terminfo, I have to include it, link against it, call bizarre functions, and then the library must be available at compile time, at runtime, and also the shared files at runtime. I have seen each one of these constraints fail for different reasons, and now I simply ignore the existence of terminfo. It is better to not abuse color, make color optional, but if you need some color you just use the xterm control codes that work everywhere.
Many people are more visually oriented, and are greatly aided by images and color. A standard `NO_EMOJIS` environment variable could perhaps be used to help both camps, just like `NO_COLOR` is available today.
Why not? Do you also don't want to see icons in GUIs?
But the main reason not to use emojis would be that you have no idea how they'll look to the user. I tried to paste the example output from yubikey-agent into my terminal, and all I got was a bunch of differently sized squares. Very informative...
Symbols are universally used for quickly warning/informing in the real world and if done well, are very intuitive. Ignoring them in the digital world would be going against human UX (but no one ignores them, of course, even very old CLis already used them, but with the widespread use of UTF-8 and Emojis with that, it just became much easier and better).
You can easily output tables, bullet lists and many other things just with basic symbols supported everywhere. If your CLI program requires installing fontawesome or breaks in a terminal multiplexer etc. I'm probably not going to use it.
Visit https://emojipedia.org and notice how all emojis have their own code point :)
Many people use the terminal exactly because it displays fewer kinds of content than e.g. a web browser, which as a side effect simplifies many situations.
- Don't assume the user's terminal's background colour. Pragmatically, you can use red; the rest are too light or too dark.
- no emojis please, ever
- if you want to make it look nice, use ANSI escape codes for color rather than emojis. even then, don't use color alone to convey meaning because it will most likely get destroyed by whatever you're piping it to.
- please take the time to write detailed man pages, not just a "--help" screen
- implement "did you mean?" for typos (git style) and potentially dangerous commands
- separate the interface into a tree of subcommands (Go/Docker/AWS style) rather than a flat assortment of flags
- if you are displaying tabular data, present an ncurses interface
- (extremely important) shell completion for bash and zsh