Re: Line editing
On 2006-08-28, Chris F.A. Johnson <cfajohnson@gmail.com> wrote:
> On 2006-08-28, Salve Håkedal wrote:
>> Prompting for input from a script with:
>>
>> echo "What do you think?"
>> read
>>
>> I start typing, but want to correct, by useing left
>> arrow I get:
>>
>> I hardly thi^[[D
>>
>> How is that done better?
>
> By using a shell that has an option to allow line editing when
> entering text with read.
>
> For example, in bash:
>
> read -ep "Your name: " name
>
Thank you Chris!
(I'll type
$ read
and learn more)
|