You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ANSI themes provided with this sink look the best, but aren't supported on many Windows versions, and shouldn't be used unless the output is going to a terminal. Some users don't want theming at all.
This creates a bit of a challenge for portable apps that want to look good.
Could we create an AdaptiveConsoleTheme.Default (plus some other portable variants like Grayscale) that dispatches to either SystemConsoleTheme, AnsiConsoleTheme or ConsoleTheme.None depending on the run-time environment?
This would choose ANSI output when supported, Windows console theming when appropriate, or no theming when output is piped or the user has indicated they do not want color output (see below).
Terminal capability detection is a bit of a minefield; http://bixense.com/clicolors/ and http://no-color.org/ propose some environment-variable-based tactics that we might also include support for.
The text was updated successfully, but these errors were encountered:
@nblumhardt I was debugging into the Console sink this morning chasing that $type thing it outputs, and started thinking about the fact that I've got a cross-platform (Win / Linux / OSX) ncurses wrapper in the works. At the time I was considering a spinoff of this sink dependent on ncurses, then I saw this issue. It might make this problem a lot easier to solve.
The main implementation is done and tested and working on all three platforms, I just need to document it and package it. (I'd also planned more samples etc but those wouldn't block usage.)
Even if you don't like an ncurses dependency, you should check out the cross-platform support. It is 100% transparent to the dependent application, except when you get an oddball Linux platform that uses a different library name, but I have provisions for easily supporting that, too.
The ANSI themes provided with this sink look the best, but aren't supported on many Windows versions, and shouldn't be used unless the output is going to a terminal. Some users don't want theming at all.
This creates a bit of a challenge for portable apps that want to look good.
Could we create an
AdaptiveConsoleTheme.Default
(plus some other portable variants likeGrayscale
) that dispatches to eitherSystemConsoleTheme
,AnsiConsoleTheme
orConsoleTheme.None
depending on the run-time environment?This would choose ANSI output when supported, Windows console theming when appropriate, or no theming when output is piped or the user has indicated they do not want color output (see below).
Terminal capability detection is a bit of a minefield; http://bixense.com/clicolors/ and http://no-color.org/ propose some environment-variable-based tactics that we might also include support for.
The text was updated successfully, but these errors were encountered: