-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
When tmux client starts, it discards all buffered input.
- Run:
sh -c 'sleep 5; tmux'
- Quickly type
echo hello
and hit ENTER. - Wait for tmux to start login shell.
- Observe that neither the
echo hello
command nor its output appear on the screen. This is unexpected. The expected behavior is the same as if step (2) was performed after step (3).
Other programs don't discard buffered input. For example, try replacing tmux
in the command given above with head -1
, sh
, or screen -q
.
I've reproduced this on Linux x86_64 (Ubuntu 20.04) with tmux 3.2a and bf595a0 (the tip of master
at the time of this writing). I don't have .tmux.conf
. My TERM
is xterm-256color. Logs from tmux: tmux-logs.tar.gz.
The logs were captured in the following environment:
docker run -e TERM -e LC_ALL=C.UTF-8 -it --rm ubuntu:focal bash -xuec '
cd
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get upgrade -y
apt-get install -y git libevent-dev ncurses-dev build-essential bison pkg-config autogen autoconf screen
git clone https://github.com/tmux/tmux.git
cd tmux
sh ./autogen.sh
./configure --prefix /tmp/tmux --exec-prefix /tmp/tmux
make install
cd
exec bash'
The actual command I ran to generate logs:
sh -c 'sleep 5; /tmp/tmux/bin/tmux -vv'
I typed echo hello
and hit ENTER while sleep 5
was running. When bash
prompt showed up, I pressed Ctrl-D.
Metadata
Metadata
Assignees
Labels
No labels