zsh-workers
 help / color / mirror / code / Atom feed
* prompt expansion %l inconsistency
@ 2001-06-04 10:17 Andrej Borsenkow
  2001-06-06 15:37 ` Andrej Borsenkow
  0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 2001-06-04 10:17 UTC (permalink / raw)
  To: ZSH Workers Mailing List

It expands to number for /dev/tty<-> (2 for /dev/tty2) and base name (e.g.
pts/5 for /dev/pts/5) for anything else. Anybody objects if I change it to
consistently return ${$(tty)#/dev/}?

-andrej


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: prompt expansion %l inconsistency
  2001-06-04 10:17 prompt expansion %l inconsistency Andrej Borsenkow
@ 2001-06-06 15:37 ` Andrej Borsenkow
  0 siblings, 0 replies; 2+ messages in thread
From: Andrej Borsenkow @ 2001-06-06 15:37 UTC (permalink / raw)
  To: ZSH Workers Mailing List

>
> It expands to number for /dev/tty<-> (2 for /dev/tty2) and base name (e.g.
> pts/5 for /dev/pts/5) for anything else. Anybody objects if I change it to
> consistently return ${$(tty)#/dev/}?
>

Silence ...

-andrej

Index: Src/prompt.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/prompt.c,v
retrieving revision 1.5
diff -u -r1.5 prompt.c
--- Src/prompt.c        2001/03/29 12:06:24     1.5
+++ Src/prompt.c        2001/06/06 15:28:57
@@ -515,8 +515,8 @@
                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("()");


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-06-06 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-04 10:17 prompt expansion %l inconsistency Andrej Borsenkow
2001-06-06 15:37 ` Andrej Borsenkow

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).