Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
334 views
in Technique[技术] by (71.8m points)

Consistent PS2 prompt in zsh when editing multiline input?

When using PS1='>>> ' and PS2='... ', entering a multi line command looks like

>>> for file in *.txt; do
...     echo "-- $file"
...     cat "$file"
... done
(Here goes the output)

When editing the command however, PS2 is ignored and I am seeing.

>>> for file in *.txt; do
    echo "-- $file"
    cat "$file"
done
(Here goes the output)

Note how the output and the command are no longer clearly separated.

Is it possible to make this more consistent, i.e. for multi line editing to respect PS2?

question from:https://stackoverflow.com/questions/66046966/consistent-ps2-prompt-in-zsh-when-editing-multiline-input

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...