Tweeted twitter.com/StackUnix/status/671416720691699713
3 added 1 character in body
source | link

I have written a number of debuggers that all can colorize source code text shown in a terminal session. They all understand that some terminals have a dark background and some have a light background and that of course the colors need to be different depending on the terminal scheme.

It is annoying to have to set to the other scheme when your terminal doesn't match the default background, so I'd like to find a way to figure this out automatically. Suggestions? (TheThey all support options --highlight={light|dark|plain})

One simple mechanism would be to key off an environment variable. For my shell profiles I've been using DARK_BACKGROUND_COLOR, but If there is already some sort of default name like there is for PAGER, EDITOR, SHELL, HOME, etc. I'd like to use that.

Is there such a environment name convention? Other suggestions?

I have written a number of debuggers that all can colorize source code text shown in a terminal session. They all understand that some terminals have a dark background and some have a light background and that of course the colors need to be different depending on the terminal scheme.

It is annoying to have to set to the other scheme when your terminal doesn't match the default background, so I'd like to find a way to figure this out automatically. Suggestions? (The all support options --highlight={light|dark|plain})

One simple mechanism would be to key off an environment variable. For my shell profiles I've been using DARK_BACKGROUND_COLOR, but If there is already some sort of default name like there is for PAGER, EDITOR, SHELL, HOME, etc. I'd like to use that.

Is there such a environment name convention? Other suggestions?

I have written a number of debuggers that all can colorize source code text shown in a terminal session. They all understand that some terminals have a dark background and some have a light background and that of course the colors need to be different depending on the terminal scheme.

It is annoying to have to set to the other scheme when your terminal doesn't match the default background, so I'd like to find a way to figure this out automatically. Suggestions? (They all support options --highlight={light|dark|plain})

One simple mechanism would be to key off an environment variable. For my shell profiles I've been using DARK_BACKGROUND_COLOR, but If there is already some sort of default name like there is for PAGER, EDITOR, SHELL, HOME, etc. I'd like to use that.

Is there such a environment name convention? Other suggestions?

2 added 3 characters in body
source | link

I have written a number of debuggers that all can colorize source code text shown in a terminal session. They all understand that some terminals have a dark background and some have a light background and that of course the colors need to be different depending on the terminal scheme.

It is annoying to have to set to the other scheme when your terminal doesn't match the default background, so I'd like to find a way to figure this out automatically. Suggestions? (The all support options --highlight={light|dark|plain})

One simple mechanism would be to key off an environment variable. For my shell profiles I've been using DARK_BACKGROUND_COLOR, but If there is already some sort of default name like there is for PAGER, EDITOR, SHELL, HOME, etc. I'd like to use that.

Is there such a environment name convention? Other suggestions?

I have written a number of debuggers that all can colorize source code text shown in a terminal session. They all understand that some terminals have a dark background and some have a light background and that of course the colors need to be different depending on the terminal scheme.

It is annoying to have to set to the other scheme when your terminal doesn't match the default background, so I'd like to find a way to figure this out automatically. Suggestions? (The all support options --highlight={light|dark|plain})

One simple mechanism would be to key off an environment variable. For my shell profiles I've been using DARK_BACKGROUND_COLOR, but If there is already some sort of default name like there for PAGER, EDITOR, SHELL, HOME, etc. I'd like to use that.

Is there such a environment name convention? Other suggestions?

I have written a number of debuggers that all can colorize source code text shown in a terminal session. They all understand that some terminals have a dark background and some have a light background and that of course the colors need to be different depending on the terminal scheme.

It is annoying to have to set to the other scheme when your terminal doesn't match the default background, so I'd like to find a way to figure this out automatically. Suggestions? (The all support options --highlight={light|dark|plain})

One simple mechanism would be to key off an environment variable. For my shell profiles I've been using DARK_BACKGROUND_COLOR, but If there is already some sort of default name like there is for PAGER, EDITOR, SHELL, HOME, etc. I'd like to use that.

Is there such a environment name convention? Other suggestions?

1
source | link

common environment variable to set dark or light terminal background

I have written a number of debuggers that all can colorize source code text shown in a terminal session. They all understand that some terminals have a dark background and some have a light background and that of course the colors need to be different depending on the terminal scheme.

It is annoying to have to set to the other scheme when your terminal doesn't match the default background, so I'd like to find a way to figure this out automatically. Suggestions? (The all support options --highlight={light|dark|plain})

One simple mechanism would be to key off an environment variable. For my shell profiles I've been using DARK_BACKGROUND_COLOR, but If there is already some sort of default name like there for PAGER, EDITOR, SHELL, HOME, etc. I'd like to use that.

Is there such a environment name convention? Other suggestions?