diff options
author | stefanf <stefanf@FreeBSD.org> | 2006-06-15 07:00:49 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2006-06-15 07:00:49 +0000 |
commit | 40616c7bb389aaa1e23907cad897503212b8e51e (patch) | |
tree | ffddd6afca1624ba622d55a632b321308ad597fc /bin/sh/var.c | |
parent | 1689a257a3225150b95ea8241663b4784ac60e9f (diff) | |
download | FreeBSD-src-40616c7bb389aaa1e23907cad897503212b8e51e.zip FreeBSD-src-40616c7bb389aaa1e23907cad897503212b8e51e.tar.gz |
Implement the PS4 variable which is defined by the POSIX User Portability
Utilities option. Its value is printed at the beginning of the line if tracing
(-x) is active. PS4 defaults to the string "+ " which is compatible with the
old behaviour to always print "+ ".
We still need to expand variables in PS1, PS2 and PS4.
PR: 46441 (part of)
Submitted by: schweikh
Obtained from: NetBSD
Diffstat (limited to 'bin/sh/var.c')
-rw-r--r-- | bin/sh/var.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/sh/var.c b/bin/sh/var.c index 4dc54b0..54a0a84 100644 --- a/bin/sh/var.c +++ b/bin/sh/var.c @@ -88,6 +88,7 @@ struct var vpath; struct var vppid; struct var vps1; struct var vps2; +struct var vps4; struct var vvers; STATIC struct var voptind; @@ -111,6 +112,8 @@ STATIC const struct varinit varinit[] = { */ { &vps2, VSTRFIXED|VTEXTFIXED, "PS2=> ", NULL }, + { &vps4, VSTRFIXED|VTEXTFIXED, "PS4=+ ", + NULL }, { &voptind, VSTRFIXED|VTEXTFIXED, "OPTIND=1", getoptsreset }, { NULL, 0, NULL, |