mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 05:24:23 +01:00
15021: new %y character; %l semantic back
This commit is contained in:
parent
551b5d1499
commit
791e11a084
@ -1,5 +1,8 @@
|
||||
2001-06-22 Andrej Borsenkow <bor@zsh.org>
|
||||
|
||||
* 15021: Src/prompt.c, Doc/Zsh/prompt.yo: revert to old %l
|
||||
semantic; add new %y character instead as suggested by Wayne
|
||||
|
||||
* 15038: Test/A01grammar.ztst: test case for 15023.
|
||||
(unposted) fix a couple of typos in test decriptions
|
||||
|
||||
|
@ -120,7 +120,12 @@ tt(%K)/tt(%L) correspond to tt(%k)/tt(%l) for the hour of the day
|
||||
(24/12 hour clock) in the same way.
|
||||
)
|
||||
item(tt(%l))(
|
||||
The line (tty) the user is logged in on.
|
||||
The line (tty) the user is logged in on without tt(/dev/) prefix.
|
||||
If name starts with tt(/dev/tty) this is stripped.
|
||||
)
|
||||
item(tt(%y))(
|
||||
The line (tty) the user is logged in on without tt(/dev/) prefix.
|
||||
It does not treat tt(/dev/tty*) specially.
|
||||
)
|
||||
item(tt(%?))(
|
||||
The return code of the last command executed just before the prompt.
|
||||
|
@ -514,6 +514,14 @@ putpromptchar(int doprint, int endchar)
|
||||
stradd(get_username());
|
||||
break;
|
||||
case 'l':
|
||||
if (*ttystrname) {
|
||||
ss = (strncmp(ttystrname, "/dev/tty", 8) ?
|
||||
ttystrname + 5 : ttystrname + 8);
|
||||
stradd(ss);
|
||||
} else
|
||||
stradd("()");
|
||||
break;
|
||||
case 'y':
|
||||
if (*ttystrname) {
|
||||
ss = (strncmp(ttystrname, "/dev/", 5) ?
|
||||
ttystrname : ttystrname + 5);
|
||||
|
Loading…
Reference in New Issue
Block a user