[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: when last output lacks \n, bash gets confused about cursor position
From: |
Chet Ramey |
Subject: |
Re: when last output lacks \n, bash gets confused about cursor position |
Date: |
Tue, 12 Aug 2008 14:49:01 -0400 |
> When using 'echo -n' or printf without a final \n, and then using
> the Up and Down keys to walk through previous commands, bash can
> get confused about its cursor position (or rather its prompt
> position) and either leave some stray text in the middle of the
> line, or overwrite part of its prompt.
This is to be expected. When bash/readline's assumption that it is
starting in column 0 is violated, you get strange results.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU chet@case.edu http://tiswww.tis.case.edu/~chet/