[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash "bug" - in "read -e -r var"
From: |
Chet Ramey |
Subject: |
Re: Bash "bug" - in "read -e -r var" |
Date: |
Sun, 14 Dec 2014 16:27:51 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
On 12/13/14 12:06 AM, Daniel A. Gauthier wrote:
>
> If you do a "read -e -r var" in bash, and use tab completion to fill-in
> a filename, it fills in "My\ File\ Name.txt" and that's exactly
> what's read into the variable. The fix is simple, in tab completion,
> the text placed into the buffer should be in the same format that the
> read is expecting, so if "-r" is in effect for the read operation, the
> the filename should be added to the buffer unquoted.
This seems like an awfully specific case (-r in effect, one or fewer
variables specified) to change readline for. I question whether it's of
general interest.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/