[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Handy prompt
How often have you typed in a complex multiline command, hit return,
and waited for something to happen until you realized you missed a
quote or a right brace and es is still waiting for more input?
Well, that is what the secondary prompt is there to avoid. Except
it's the empty string by default, so people can cut their previous
commands with the mouse and reuse them without prejudice.
I just thought of this last night:
prompt='; ' \*\b
Now you have both the advantages of a secondary prompt and the ability
to copy commands with the mouse, since the secondary prompt will be
overwritten by what you type.
This requires a terminal that can backspace, of course. It may
confuse readline/editline perhaps. But I find it very useful.
(I have known people to use spaces or a tab for the secondary prompt,
resulting in a copyable screen of course, but those spaces will
multiply if you copy and paste repeatedly so that is less useful.)
- Harald