mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +02:00
%P at start of TCP function system prompt causes %-style prompt subst
This commit is contained in:
parent
d3d0910293
commit
15db636380
3 changed files with 14 additions and 3 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,8 +1,12 @@
|
||||||
2014-07-30 Peter Stephenson <p.stephenson@samsung.com>
|
2014-07-30 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
* 32918: Doc/Zsh/prompt.yo, Functions/TCP/tcp_output,
|
* 32919: Doc/Zsh/tcpsys.yo Functions/TCP/tcp_output: %P
|
||||||
Src/builtin.c,Src/prompt.c, Src/utils.c, Src/watch.c: add
|
at start of prompt in TCP function system causes standard
|
||||||
ability to display times with fractions of a second in prompts.
|
%-style substitution.
|
||||||
|
|
||||||
|
* 32918: Doc/Zsh/prompt.yo, Src/builtin.c,Src/prompt.c,
|
||||||
|
Src/utils.c, Src/watch.c: add ability to display times with
|
||||||
|
fractions of a second in prompts.
|
||||||
|
|
||||||
2014-07-28 Barton E. Schaefer <schaefer@zsh.org>
|
2014-07-28 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
|
|
@ -666,6 +666,10 @@ expression `tt(%c)' expands to 1 if the session being read is the current
|
||||||
session, else 0; this is most useful in ternary expressions such as
|
session, else 0; this is most useful in ternary expressions such as
|
||||||
`tt(%LPAR()c.-.PLUS()RPAR())' which outputs `tt(PLUS())' if the session is
|
`tt(%LPAR()c.-.PLUS()RPAR())' which outputs `tt(PLUS())' if the session is
|
||||||
the current one, else `tt(-)'.
|
the current one, else `tt(-)'.
|
||||||
|
|
||||||
|
If the prompt starts with tt(%P), this is stripped and the complete
|
||||||
|
result of the previous stage is passed through standard prompt tt(%)-style
|
||||||
|
formatting before being output.
|
||||||
)
|
)
|
||||||
vindex(TCP_READ_DEBUG)
|
vindex(TCP_READ_DEBUG)
|
||||||
item(tt(TCP_READ_DEBUG))(
|
item(tt(TCP_READ_DEBUG))(
|
||||||
|
|
|
@ -35,6 +35,9 @@ if [[ -n $tprompt ]]; then
|
||||||
cursess="c:0"
|
cursess="c:0"
|
||||||
fi
|
fi
|
||||||
zformat -f REPLY $tprompt "s:$sess" "f:$read_fd" $cursess
|
zformat -f REPLY $tprompt "s:$sess" "f:$read_fd" $cursess
|
||||||
|
if [[ $REPLY = %P* ]]; then
|
||||||
|
REPLY=${(%)${REPLY##%P}}
|
||||||
|
fi
|
||||||
# We will pass this back up.
|
# We will pass this back up.
|
||||||
REPLY="$REPLY$*"
|
REPLY="$REPLY$*"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue