Added option that displays an empty line before the actual prompt
This commit is contained in:
parent
8e1480c41e
commit
eeed7e79a1
3 changed files with 9 additions and 1 deletions
|
@ -142,6 +142,8 @@ The `layout_*` variables control the prompt's layout and general appearance:
|
|||
default this entry contains an empty string.
|
||||
* `layout_input_always` determines whether the input line should be rendered
|
||||
even if no generators are specified (`0` or `1`, default `0`).
|
||||
* `layout_empty_line` prints an empty line before the prompt's top line. This
|
||||
prevents display problems when some command outputs a line without `\n`.
|
||||
|
||||
The `term_*` variables control the prompt's ability to change the terminal's
|
||||
title and/or icon title:
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
] ,
|
||||
# - Always generate input line?
|
||||
layout_input_always => 0 ,
|
||||
# - Add an empty line before the prompt?
|
||||
layout_empty_line => 0 ,
|
||||
|
||||
# TERMINAL TITLE
|
||||
# - Set title from the prompt? 0=no, 1=normal, 2=minimized, 3=both
|
||||
|
|
|
@ -45,6 +45,8 @@ our %CONFIG = (
|
|||
layout_input => [ qw( userhost cwd ) ] ,
|
||||
# - Always generate input line?
|
||||
layout_input_always => 0 ,
|
||||
# - Add an empty line before the prompt?
|
||||
layout_empty_line => 0 ,
|
||||
|
||||
# TERMINAL TITLE
|
||||
# - Set title from the prompt? 0=no, 1=normal, 2=minimized, 3=both
|
||||
|
@ -790,7 +792,9 @@ sub main
|
|||
$RESET = '\\[' . $RESET . '\\]';
|
||||
%TLEN = compute_trans_lengths;
|
||||
my $pg = gen_term_title;
|
||||
my $ps1 = $pg . gen_top_line;
|
||||
my $ps1 = $pg;
|
||||
$ps1 .= "\\n" if $CONFIG{layout_empty_line};
|
||||
$ps1 .= gen_top_line;
|
||||
my ( $ill , $ilt ) = gen_input_line;
|
||||
$ps1 .= $ilt;
|
||||
my $ps2 = $pg . gen_ps2( $ill );
|
||||
|
|
Loading…
Reference in a new issue