diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2004-11-08 23:42:03 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2004-11-08 23:42:03 +0000 |
commit | 459774ac5bc7615464e608c12cfca26482ba90ac (patch) | |
tree | a4eb07e545ae29e4c30551b1cd73857f15d32a44 /bin | |
parent | e9d3a2fa04cee6d61855d6825b26e86497f7ccf8 (diff) |
add a more complex PS1 example, which does not use the new backslash
sequences;
from naddy@, via deraadt@
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ksh/ksh.1 | 12 | ||||
-rw-r--r-- | bin/ksh/ksh.1tbl | 12 |
2 files changed, 22 insertions, 2 deletions
diff --git a/bin/ksh/ksh.1 b/bin/ksh/ksh.1 index 6fa35afe2a5..c561638cc72 100644 --- a/bin/ksh/ksh.1 +++ b/bin/ksh/ksh.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ksh.1,v 1.77 2004/11/06 01:07:41 jmc Exp $ +.\" $OpenBSD: ksh.1,v 1.78 2004/11/08 23:42:02 jmc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -1653,6 +1653,16 @@ The latter is more practical: .Bd -literal -offset indent $ export PS1="\eu " .Ed +.Pp +This is a more complex example, +which does not rely on the above backslash-escaped sequences. +It embeds the current working directory, +in reverse video, +in the prompt string: +.Bd -literal -offset indent +$ x=$(print \e\e001) +$ PS1="$x$(print \e\er)$x$(tput so)$x\e$PWD$x$(tput se)$x> " +.Ed .It Ev PS2 Secondary prompt string, by default .Dq \&>\ \& , diff --git a/bin/ksh/ksh.1tbl b/bin/ksh/ksh.1tbl index 151a0def26d..f22c9ad7508 100644 --- a/bin/ksh/ksh.1tbl +++ b/bin/ksh/ksh.1tbl @@ -1,4 +1,4 @@ -.\" $OpenBSD: ksh.1tbl,v 1.77 2004/11/06 01:07:41 jmc Exp $ +.\" $OpenBSD: ksh.1tbl,v 1.78 2004/11/08 23:42:02 jmc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -1653,6 +1653,16 @@ The latter is more practical: .Bd -literal -offset indent $ export PS1="\eu " .Ed +.Pp +This is a more complex example, +which does not rely on the above backslash-escaped sequences. +It embeds the current working directory, +in reverse video, +in the prompt string: +.Bd -literal -offset indent +$ x=$(print \e\e001) +$ PS1="$x$(print \e\er)$x$(tput so)$x\e$PWD$x$(tput se)$x> " +.Ed .It Ev PS2 Secondary prompt string, by default .Dq \&>\ \& , |