14766: unify %l substitution (tty0, pts/3 etc)

This commit is contained in:
Andrey Borzenkov 2001-06-06 16:38:50 +00:00
parent 573445867a
commit 6c187b251a
2 changed files with 4 additions and 2 deletions

View file

@ -9,6 +9,8 @@
2001-06-06 Andrej Borsenkow <bor@zsh.org>
* 14766: Src/prompt.c: unify %l substitution (tty0, pts/3 etc)
* 14760: zshconfig.ac: use old-style AC_INIT without version
* 14758: zshconfig.ac: no more ac_cv_cygwin in autoconf-2.50;

View file

@ -515,8 +515,8 @@ putpromptchar(int doprint, int endchar)
break;
case 'l':
if (*ttystrname) {
ss = (strncmp(ttystrname, "/dev/tty", 8) ?
ttystrname + 5 : ttystrname + 8);
ss = (strncmp(ttystrname, "/dev/", 5) ?
ttystrname : ttystrname + 5);
stradd(ss);
} else
stradd("()");