[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Terminal settings change unexpectedly after running a program via keybin

From: Markus Napierkowski
Subject: Terminal settings change unexpectedly after running a program via keybinding
Date: Fri, 11 Mar 2022 16:32:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security
uname output: Linux markus-laptop 5.10.103 #1-NixOS SMP Wed Mar 2 10:42:57 UTC 2022 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 5.1
Patch Level: 8
Release Status: release

    Terminal input settings are changed unexpectedly after these steps:

    1. Run a command via key-binding (registered with `bind -x`).
    2. Immediately after that, execute another program via commandline
    3. Cancel the execution of that program with `Ctrl-C`.

    In particular, input characters are no longer echoed to the
    terminal. This only happens if both the script bound to a key and
    the cancelled program are actual programs (builtins don't seem to
    trigger this).

    stty output from before and after:

    speed 38400 baud; line = 0;
    -brkint -imaxbel iutf8

    speed 38400 baud; line = 0;p:~]$
    lnext = <undef>; discard = <undef>; min = 1; time = 0;
    -brkint -icrnl -imaxbel iutf8
    -icanon -echo

    1. Bind a program to a key, e.g.:
       $ bind -x '"\C-o": "hello"'
    2. Hit the key combination (Ctrl-O)
    3. Execute a long running command, e.g.:
       $ sleep 100
    4. Cancel the running command (Ctrl-C)
    5. Observe that input characters are no longer echoed

reply via email to

[Prev in Thread] Current Thread [Next in Thread]