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

Raise escape-timeout from 0 to 1 #60

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

Conversation

mbaezner
Copy link

Raise escape-timeout from 0 to 1 to avoid catching Bash color codes when loading several components in the .bashrc file on Windows Subsystem for Linux 2.

image

…hen loading several components in the .bashrc file on Windows Subsystem for Linux 2.
@Blosberg
Copy link

I support this for a plugin that's intended to be a "sensible" set of defaults that noone can object to. No human being will ever perceive a delay of 1 ms, and it patches Issue #61 for WSL users.

@d1rebear
Copy link

d1rebear commented Jun 9, 2023

This makes sense, let's merge it

@MJJBennett
Copy link

Not sure if this repository is maintained but this change did fix similar issues for me in WSL2. (Very) difficult problem to diagnose, so it definitely seems like this patch would be useful to have and prevent future headaches. It's also worth noting that the SuperUser answer that is cited in this setting's comment in the plugin explicitly discourages doing what the plugin is doing (although, that seems to be an edit more recent than this PR, so):

As pointed out [...] setting an escape time of zero is a bad idea but rather, set it to a low enough value such that you are not bothered by the delay.

For more rationale as to why this configuration setting is a poor idea [and definitely does not fit the stated purpose of this repository], see the referenced answer here: https://superuser.com/a/1809494

Not sure if any additional information is required to merge this PR as it has been sitting untouched for over two years.

@buckley310
Copy link

As of tmux 3.4 (which is not released yet), tmux will actually stop you from setting this value to 0.
So yeah, +1 on merging this.

ref
tmux/tmux@201a8d8
wez/wezterm#2060 (comment)

@AngeloThys
Copy link

It's a sensible default value, as stated by various sources:

tmux set-option -s escape-time 0 interrupts and even breaks behaviour on various terminals/platforms

Even if tmux 3.4 fixes this by hardcoding a change from 0 to 1, the previous versions should still be able to benefit from this plugin without experiencing breaking behaviour.

@buckley310
Copy link

The description of escape-time in README.md still says 0. This PR should probably include a change to that as well.

@nathan-mhk
Copy link

The version of tmux installed with sudo apt install tmux on WSL 2 (running Ubuntu 22.04.4 LTS) is 3.2a. I got the escape sequence ^[[>0;10;1c leaking into the shell and it took me a whole day to find out that this is the cause of the problem. Raising the value to 1 is enough for the leaking to stop.

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.

7 participants