On Thu, 28 May 2009, Chet Ramey wrote:

> > 
> > This is nothing new; it happens in all versions of bash:
> > 
> > printf "Enter something: "
> > read -e whatever
> > 
> > Press a key, then cursor left (or ^A); the cursor moves to the
> > beginning of the line, over "E" instead of over the character just
> > entered.
> 
> This isn't a bug; that's where readline thinks the cursor is.

   Why would it think that? It's wrong.

>  If you want to use a prompt, use `read -p'.

   I like to write portable scripts; read -p is not portable.

-- 
   Chris F.A. Johnson, webmaster         <http://woodbine-gerrard.com>
   ===================================================================
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


Reply via email to