[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "read -n" miscounts if typed characters are control chars
From: |
Chet Ramey |
Subject: |
Re: "read -n" miscounts if typed characters are control chars |
Date: |
Thu, 14 Apr 2005 15:55:10 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Macintosh/20050317) |
pgf@foxharp.boston.ma.us wrote:
> Bash Version: 2.05
> Patch Level: 8
> Release Status: release
>
> Description:
> if "read -n" is used to read control character input from
> a tty, it will miscount the input characters by a factor
> of two.
Thanks for the report. The bug still exists in the current release,
but it's an easy fix.
Note that this happens only for ^A, not any control character. The
shell uses ^A for internal quoting, and has to treat it specially on
input. That's the reason for the doubled counts.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/