tmux prints garbage around prompt after attaching when escape-time is 0
Please use the following bug reporting template to help produce actionable and reproducible issues. Please try to ensure that the reproduction is minimal so that the team can go through more bugs!
- A brief description
Setting the tmux escape time to zero prints escape code garbage around the initial prompt. It also happens when re-attaching tmux after detaching. It does not happen when creating windows inside tmux. The garbage printed looks like responses to terminal type queries (see http://docstore.mik.ua/orelly/unix/upt/ch05_05.htm and the response for base VT100 there) that I guess tmux does when attaching.
echo "set -s escape-time 0" > testtmux.conf
tmux -f testtmux.conf
- Expected results
I expect the prompt to look like this:
robbie@SERIES9:~$
- Actual results (with terminal output if applicable)
Some escape code garbage is printed around the prompt:
^[[?1;0crobbie@SERIES9:~$ 1;0c
-
Your Windows build number 10.0.14393 Build 14393
-
Steps / All commands required to reproduce the error from a brand new installation
sudo apt-get install tmux
echo "set -s escape-time 0" > testtmux.conf
tmux -f testtmux.conf
-
Strace of the failing command /
-
Required packages and commands to install tmux
See our contributing instructions for assistance.
Out of curiosity, @robbiev why are you setting escape-time to 0? I haven't really seen this before, so I'll investigate it, but I'm curious why someone would do this.
I think the reason was as described in the "Faster Command Sequences" section here: https://mutelight.org/practical-tmux
Upon starting to use tmux, I noticed that I had to add a noticeable delay between two characters in a command sequence for it to recognize the command, for example between the C-a and n in C-a n. This is because tmux is waiting for an escape sequence. Fix that by setting escape time to zero.
I've had this in my tmux.conf for ages and I've never had any problems on Linux or OS X.
This is also commonly used by VIM users inside tmux - without this setting, one has to wait for the standard delay to pass before hitting ESC returns to command mode, etc.
I had this problem too, but setting escape-time to 20 seems to be (for me at least) an acceptable workaround.
Thanks for the discussion.
Closing this issue since:
- This issue is very old and has likely been fixed in recent Win10 builds
- This is the WSL issues repo, but this is an issue in Console which has its own Console GitHub Repo
- GitHub doesn't allow issues to be moved between repos, preserving posters' identity :(
If you have further asks/issues, please file new issues on our Console GitHub Repo.