Commit 9465ad24 authored by Per Bothner's avatar Per Bothner

New distinct "secondary" prompt kind

parent 54a8fa01
......@@ -6,7 +6,7 @@ function __prompt_precmd() {
_PROMPT_SAVE_PS1="$PS1"
_PROMPT_SAVE_PS2="$PS2"
PS1='\[\e]133;P;k=i\a\]'$PS1'\[\e]133;B\a\e]122;> \a\]'
PS2='\[\e]133;P;k=c\a\]'$PS2'\[\e]133;B\a\]'
PS2='\[\e]133;P;k=s\a\]'$PS2'\[\e]133;B\a\]'
fi
if test "$_prompt_executing" != ""
then
......
......@@ -6,7 +6,7 @@ function __prompt_precmd() {
_PROMPT_SAVE_PS1="$PS1"
_PROMPT_SAVE_PS2="$PS2"
PS1=$'%{\e]133;P;k=i\a%}'$PS1$'%{\e]133;B\a\e]122;> \a%}'
PS2=$'%{\e]133;P;k=c\a%}'$PS2$'%{\e]133;B\a%}'
PS2=$'%{\e]133;P;k=s\a%}'$PS2$'%{\e]133;B\a%}'
fi
if test "$_prompt_executing" != ""
then
......
......@@ -74,7 +74,8 @@ For example fish uses `⏎`, while zsh uses `%` (in inverse video).
> Explicit start of prompt. Optional after an `A` or `N` command.
> The `k` (kind) option specifies the type of prompt:
> regular primary prompt (`k=i` or default),
> right-side prompts (`k=r`), or prompts for continuation lines (`k=c`).
> right-side prompts (`k=r`), or prompts for continuation lines
> (`k=c` or `k=s`).
> Applicable options: `k` (kind).
......@@ -188,7 +189,10 @@ A terminal must ignore an _option_ whose _option-name_ it doesn't recognize.
`k=` _prompt_kind_
> Specify the kind of prompt sequence.
> A normal left first-line prompt has kind `i` (initial), which is the default.
> Continuation prompts have kind `c` (continuation).
> Prompts for continuation lines have kind `c` (continuation),
> or kind `s` (secondary).
> The difference between `c` and `s` is that `c` allows
> the user to "go back" and edit previous lines, while `s` does not.
> A right-aligned prompt has kind `r` (right).
> When reflowing lines with a `r` prompt, a terminal may optionally
> adjust spacing so the right prompt stays at the right end of the line.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment