bug-bash
[Top][All Lists]
Advanced

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

timeout option for read that restarts on type


From: Juuso Alasuutari
Subject: timeout option for read that restarts on type
Date: Thu, 6 Apr 2006 18:33:30 +0300
User-agent: KMail/1.9.1

From: iuso
To: bug-bash@gnu.org
Subject: timeout option for read that restarts on type

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation 
CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' 
-DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' 
-DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H  -I.  
-I. -I./include -I./lib   -O2 -march=pentium-m -pipe -fomit-frame-pointer
uname output: Linux kamayuq 2.6.16-ck3 #1 PREEMPT Wed Apr 5 01:04:13 EEST 2006 
i686 GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 3.0
Patch Level: 16
Release Status: release

Description:
        The read command should have an option to use timeout which 
        restarts every time a character is typed.

Repeat-By:
        Source Mage GNU/Linux uses 'read -t' with a configurable timeout 
        value for some of its core operations. It is frustrating to have 
        the timeout exceed just as user is in mid-sentence.
        The present hack to get around this is to use 'read -t <value> 
        -n 1' to capture the first typed char, and then continue after 
        that with a second read command without a timeout value.
        The downsides to this are obvious. First of all it's impossible 
        to backspace the first character typed. It also prevents the use 
        of the -e option, which enables arrow, home, and end key usage, 
        and lets the user to back up to the previous rows of typed text.

Fix:
        [Description of how to fix the problem.  If you don't know a
        fix for the problem, don't include this section.]




reply via email to

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