about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrey Borzenkov <bor@users.sourceforge.net>2001-06-06 16:38:50 +0000
committerAndrey Borzenkov <bor@users.sourceforge.net>2001-06-06 16:38:50 +0000
commit6c187b251a73c234afddc2e5142f967ec89e0746 (patch)
tree0c5d78509dd56c6c26fa9a23b8714b37ca1497bb
parent573445867adba7bbaf5cf557dfa0cd3c7befa0b6 (diff)
downloadzsh-6c187b251a73c234afddc2e5142f967ec89e0746.tar.gz
zsh-6c187b251a73c234afddc2e5142f967ec89e0746.tar.xz
zsh-6c187b251a73c234afddc2e5142f967ec89e0746.zip
14766: unify %l substitution (tty0, pts/3 etc)
-rw-r--r--ChangeLog2
-rw-r--r--Src/prompt.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e5d338906..40c6884f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
diff --git a/Src/prompt.c b/Src/prompt.c
index 84f88b2d3..47c8af797 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -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("()");