[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
4.4-rc1: readline wrapping error when prompt wraps around
From: |
Andreas Schwab |
Subject: |
4.4-rc1: readline wrapping error when prompt wraps around |
Date: |
Sat, 26 Mar 2016 11:08:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) |
When $PS1 contains \[ \] and is longer than the line length then
readline miscounts the wrap coloumn. For example, set PS1 like this:
PS1="\[$(tput bold)\]$(printf '%*s' $(stty size | awk '{print$2}') x)\[$(tput
sgr0)\] "
This causes readline to wrap the input too early by the amount of hidden
characters inside \[ \].
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- 4.4-rc1: readline wrapping error when prompt wraps around,
Andreas Schwab <=