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

tmux not recognized as interactive terminal (no color) #261

Open
joliss opened this issue Jul 12, 2023 · 2 comments
Open

tmux not recognized as interactive terminal (no color) #261

joliss opened this issue Jul 12, 2023 · 2 comments

Comments

@joliss
Copy link

joliss commented Jul 12, 2023

I'm in an interactive terminal in a tmux:

$ echo $TMUX
/tmp/tmux-1000/default,16080,0

$ test -t 1 && echo stdout is a terminal
stdout is a terminal

But when I run duf, I don't get colorized output unless I set CLICOLOR_FORCE=1.

@C0rn3j
Copy link

C0rn3j commented Mar 3, 2024

% duf --version                                                                                                                   
duf 0.8.1

% tmux -V       
tmux 3.4

Works fine here, can you still reproduce?

If so, try posting env output and we can see what's different.

@joliss
Copy link
Author

joliss commented Apr 12, 2024

Ah, it works fine on tmux 3.4 on Mac, but not on tmux 3.2a on Linux. The difference seems to be that with tmux 3.2a on Linux, I have TERM=screen, but with tmux 3.4, I have TERM=screen-256color.

~/src/duf $ tmux -V
tmux 3.2a
~/src/duf $ echo $TERM
screen
~/src/duf $ ./duf
[no color]
~/src/duf $ TERM=screen-256color ./duf
[has color]

It would probably be fine for duf to default to printing ANSI codes when TERM=screen and stdout is a terminal.

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

No branches or pull requests

2 participants