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

Using tmux in the terminal environment has strange encoding #114

Open
vec4 opened this issue Jun 19, 2020 · 2 comments
Open

Using tmux in the terminal environment has strange encoding #114

vec4 opened this issue Jun 19, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@vec4
Copy link
Collaborator

vec4 commented Jun 19, 2020

tmux is nice to have as it lets a user easily switch between viewing some code and doing something in the terminal (such as running a tool to see its output and compare it to the source code). I can imagine a good amount of users would use tmux if they are familiar with it.

While tmux works in the environment, it seems to have issues with encoding the user and hostname. For example, freecc@node1:~$ ends up being \[\033[01;32m\]\u@\h:\W$ \[\033[0m\]. It is on the container side, as the same thing happens when using tmux under docker exec.

This is a very minor bug, of course, but I wanted to make note of it as tmux is quite popular.

We may also consider having a visual tab for a second terminal environment to serve the same purpose (it would be connected to the same docker container). This is on my list of features to add for interface improvement (#110).

@vec4 vec4 added the bug Something isn't working label Jun 19, 2020
@ouankou
Copy link
Collaborator

ouankou commented Jul 9, 2020

If we create a config file for tmux under the home folder, it will show the correct prompt.

$HOME/.tmux.conf with the following content:

set-option -g default-command bash

After creating this file in the FreeCC sandbox, executing tmux looks fine. If necessary, we can add this config file while building docker images.

@vec4
Copy link
Collaborator Author

vec4 commented Jul 9, 2020

Thanks for looking into this @ouankou! I'm glad the solution is something simple. We can incorporate it if you like, but it's pretty low priority so I'm fine either way.

I still want to make the visual tab component, like the one on play-with-go. In that case, we probably don't even need tmux, although it still may be useful for the rare user who is deadset on tmux :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants