mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-19 03:31:14 +02:00
25242: Mikael V prompt test for contents of psvar
This commit is contained in:
parent
0d7df628a4
commit
a440669201
3 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-06-24 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* 25242: Mikael: Doc/Zsh/prompt.yo, Src/prompt.c: add V prompt
|
||||||
|
test for contents of psvar.
|
||||||
|
|
||||||
2008-06-23 Peter Stephenson <pws@csr.com>
|
2008-06-23 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
* 25237: Doc/Zsh/tcpsys.yo, Functions/TCP/tcp_open: make
|
* 25237: Doc/Zsh/tcpsys.yo, Functions/TCP/tcp_open: make
|
||||||
|
|
|
@ -274,6 +274,8 @@ sitem(tt(S))(True if the tt(SECONDS) parameter is at least var(n).)
|
||||||
sitem(tt(T))(True if the time in hours is equal to var(n).)
|
sitem(tt(T))(True if the time in hours is equal to var(n).)
|
||||||
sitem(tt(t))(True if the time in minutes is equal to var(n).)
|
sitem(tt(t))(True if the time in minutes is equal to var(n).)
|
||||||
sitem(tt(v))(True if the array tt(psvar) has at least var(n) elements.)
|
sitem(tt(v))(True if the array tt(psvar) has at least var(n) elements.)
|
||||||
|
sitem(tt(V))(True if element var(n) of the array tt(psvar) is set and
|
||||||
|
non-empty.)
|
||||||
sitem(tt(w))(True if the day of the week is equal to var(n) (Sunday = 0).)
|
sitem(tt(w))(True if the day of the week is equal to var(n) (Sunday = 0).)
|
||||||
endsitem()
|
endsitem()
|
||||||
)
|
)
|
||||||
|
|
|
@ -321,6 +321,12 @@ putpromptchar(int doprint, int endchar, unsigned int *txtchangep)
|
||||||
if (arrlen(psvar) >= arg)
|
if (arrlen(psvar) >= arg)
|
||||||
test = 1;
|
test = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'V':
|
||||||
|
if (arrlen(psvar) >= arg) {
|
||||||
|
if (*psvar[(arg ? arg : 1) - 1])
|
||||||
|
test = 1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case '_':
|
case '_':
|
||||||
test = (cmdsp >= arg);
|
test = (cmdsp >= arg);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue