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

ANSI escape sequences (tree) #1155

Open
FingerCramp opened this issue Oct 4, 2021 · 10 comments
Open

ANSI escape sequences (tree) #1155

FingerCramp opened this issue Oct 4, 2021 · 10 comments
Labels

Comments

@FingerCramp
Copy link

I understand mosh does something with respect to ANSI escape sequences, but I don't quite understand it. Using ssh, running the 'tree' command looks like this:

$ tree
.
├── [   0]  one
├── [   0]  three
└── [   0]  two

0 directories, 3 files

But, through mosh, it looks like this:

$ tree
.
tqq [   0]  one
tqq [   0]  three
mqq [   0]  two

0 directories, 3 files

Is there something I can do to make this display properly?

-Mike

@eminence
Copy link
Member

Can you check to see if you have NCURSES_NO_UTF8_ACS=1 in your environment?

@FingerCramp
Copy link
Author

FingerCramp commented Dec 10, 2021 via email

@eminence
Copy link
Member

Can you try to set NCURSES_NO_UTF8_ACS=1? mosh-server sets this automatically, but sometimes it can be dropped (if you ssh into another system, or if you attach to a screen/tmux session that doesn't have it set)

@FingerCramp
Copy link
Author

FingerCramp commented Dec 13, 2021 via email

@achernya
Copy link
Collaborator

I cannot reproduce this with a mosh-client 1.4.0 connected to a mosh-server 1.3.2 on Ubuntu 18.04.

This is what I see

$ env -u NCURSES_NO_UTF8_ACS tree                                                                                                                         
.
├── one
├── three
└── two

0 directories, 3 files
$ echo $TERM
xterm-256color

If you are still experiencing this issue, please include the value of $TERM and if possible the rest of your env output, as well as the output of lsb_release -a and reopen this issue.

@achernya achernya closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 2023
@FingerCramp
Copy link
Author

FingerCramp commented Jan 22, 2023 via email

@achernya
Copy link
Collaborator

What is $TERM outside of mosh? What terminal is being used? Can you post the rest of env and locale?

@FingerCramp
Copy link
Author

FingerCramp commented Jan 22, 2023 via email

@achernya
Copy link
Collaborator

That's very weird. I still can't reproduce the behavior you're seeing, but I'm admittedly using Terminal.app, not iTerm2. Any chance you could post the output of infocmp to see what ncurses thinks is going on? Maybe there's some weird local override? Because it seems like, despite NCURSES_NO_UTF8_ACS=1 being set, tree is emitting the Line Graphics characters and not the UTF-8 alternatives.

For example, in Terminal.app directly

 $ tput smacs && echo tqq && tput rmacs
├──

but in mosh --local 127.0.0.1 inside Terminal.app

$ tput smacs && echo tqq && tput rmacs
tqq

@achernya achernya reopened this Jan 22, 2023
@FingerCramp
Copy link
Author

FingerCramp commented Jan 22, 2023 via email

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

No branches or pull requests

3 participants