|
From: | Rob Foehl |
Subject: | bind -x and multiple prompt/command lines |
Date: | Mon, 14 Apr 2014 02:02:18 -0400 (EDT) |
User-agent: | Alpine 2.10 (LFD 1266 2009-07-14) |
A minimal test case: do_nothing () { :; } bind -x '"\C-k": do_nothing'Then compare the result of pressing C-k at the prompt when PS1 expands to a single line vs. multiple lines, like '\u$ ' and '\u\n$ ' . The same thing happens with input lines long enough to wrap, and at least there is inconsistent with other actions that clear the input line.
I've confirmed this with 4.3.11(7)-release built from git commit b7ec181 (current as of this writing), as well as several patch levels of 4.2 as shipped by various Linux distributions.
Does readline know enough about where a multi-line prompt starts to be able to clear and redisplay the whole thing? I'm not familiar with the code, but from a quick read it seems like that capability would be necessary to change this behavior. I'm curious about this because I'm looking for ways to do more advanced command rewriting than completion permits, and the READLINE_LINE facility has some potential...
-Rob
[Prev in Thread] | Current Thread | [Next in Thread] |