tmux-sensible icon indicating copy to clipboard operation
tmux-sensible copied to clipboard

Raise escape-timeout from 0 to 1

Open mbaezner opened this issue 3 years ago • 7 comments

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

mbaezner avatar Apr 25 '21 00:04 mbaezner

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.

Blosberg avatar Oct 31 '22 10:10 Blosberg

This makes sense, let's merge it

d1rebear avatar Jun 09 '23 07:06 d1rebear

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.

MJJBennett avatar Oct 28 '23 01:10 MJJBennett

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 https://github.com/tmux/tmux/commit/201a8d8e7eb0bf208918c698e64aa120864c6dfc https://github.com/wez/wezterm/issues/2060#issuecomment-1143775552

buckley310 avatar Nov 16 '23 16:11 buckley310

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.

AngeloThys avatar Jan 18 '24 12:01 AngeloThys

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

buckley310 avatar Jan 18 '24 20:01 buckley310

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.

nathan-mhk avatar Apr 13 '24 07:04 nathan-mhk