bug-bash
[Top][All Lists]
Advanced

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

Re: Bugreport builtin command 'read'


From: Greg Wooledge
Subject: Re: Bugreport builtin command 'read'
Date: Thu, 4 Jan 2018 08:43:02 -0500
User-agent: NeoMutt/20170113 (1.7.2)

On Thu, Jan 04, 2018 at 11:24:30AM +0100, skynet@top-email.net wrote:
> # Bug 1?:     +Option read -n1
> - Cursor doesn't jump automaticly to next line

It's not supposed to.  If you want that, just do an "echo" after the
read.

> # Bug 2:      +Options read -n1 -e
> - Command freezes in case of typing characters like öäü' and so on. (German 
> keyboard layout)

Confirmed on Debian 9 with locale en_US.UTF-8.  In an interactive shell,
issuing "read -n1 -e" and then typing í (Compose + ' + i) causes í to be
displayed, followed by a newline; the read command does not terminate.
Sending another character (e.g. space) causes that character to be
displayed, without a newline, but the read still does not terminate.
Pressing Enter finally terminates the read command, and issues TWO
shell prompts.

Repeating again, with "ájkEnter" as input, gives á + newline, jk + newline,
a shell prompt with "k" shown as an entered command, the error message
"bash: k: command not found", and then a second shell prompt.
The REPLY variable contains:

wooledg:~$ printf %s "$REPLY" | od -t x1
0000000 c3 6a
0000002

In other words, it contains the first byte of á (c3) and then the single
byte for j (6a), which I believ is not a valid character string.



reply via email to

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