Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tmux text being always red #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rico-chet
Copy link

tmux (https://github.com/tmux/tmux/wiki) is a terminal multiplexer,
like screen. It spawns its terminals with argv[0] prefixed with a
'-', thus breaking stderred's early return on bash encounter. This
leads to normal text being always red.

When PROGRAM_NAME matches the '-%s' format pattern, treat it as a
shell and return early.

Refer to https://github.com/tmux/tmux/blob/c9d482ab489d5d57d481858091608ee1b32e46ab/window.c#L993
and to tmux/tmux@22d1b94.

Fixes #52

`tmux` (https://github.com/tmux/tmux/wiki) is a terminal multiplexer,
like `screen`. It spawns its terminals with `argv[0]` prefixed with a
'-', thus breaking `stderred`'s early return on `bash` encounter. This
leads to normal text being always red.

When `PROGRAM_NAME` matches the '-%s' format pattern, treat it as a
shell and return early.

Refer to https://github.com/tmux/tmux/blob/c9d482ab489d5d57d481858091608ee1b32e46ab/window.c#L993
and to tmux/tmux@22d1b94.

Fixes ku1ik#52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using stderred with tmux makes all text red
2 participants