[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash doesn't display user-typed characters; can interfere with COPY/
L A Walsh
Re: bash doesn't display user-typed characters; can interfere with COPY/PASTE
Tue, 08 Dec 2020 15:38:11 -0800
On 2020/12/08 06:28, Greg Wooledge wrote:
The end result is that it's basically impossible to preserve the original
whitespace of your source material across a terminal copy/paste operation.
So don't count on that.
If you use a random terminal to copy/paste, sure, but if you use a
product that maintains fidelity, then it's not true.
Especially nice are term-progs that automatically reflow text *as
the terminal. Like if you see 100 characters written to an 80-column
that line wraps the text, when you expand the width, you retain the original
white space. That's why programs that don't preserve what you wrote are
And note -- you see the reflow in real-time as you change dimensions --
at the end.
Imagine working on a terminal that only displayed upper case even if the
differentiation was saved when stored. You can't really see the text as
when you enter it or re-edit it. With it putting in something different on
display than what is really there, you get things like (tab chars between
echo "a b c d e f g h
i j k l m n o p q
r s t a b c d e f
g h i j k l m n o
p q r s t"
a b c d e f g h i j k l m n o p q r s t a b c d e f g h i j k l m n o p
q r s t
If you re-edit a line with tabs in it that displays like it does in the
line, above (tabs ever 2 spaces), the re-edited "line" takes up 4 lines.