commit: d54b0d119607477eed06bc9b00b3a8a1eefba382
parent: a8c51c0cfc568dae4586513c77487004c7a420db
author: Brian Callahan <bcallah@openbsd.org>
date: Sat, 31 Oct 2020 20:40:56 -0400
Add an OKSH_VERSION default variable with the current oksh version.
1 file changed, 2 insertions(+)
diff --git a/main.c b/main.c
@@ -82,6 +82,7 @@ static const char initsubs[] = "${PS2=> } ${PS3=#? } ${PS4=+ }";
static const char *initcoms [] = {
"typeset", "-r", "KSH_VERSION", NULL,
+ "typeset", "-r", "OKSH_VERSION", NULL,
"typeset", "-x", "SHELL", "PATH", "HOME", "PWD", "OLDPWD", NULL,
"typeset", "-ir", "PPID", NULL,
"typeset", "-i", "OPTIND=1", NULL,
@@ -300,6 +301,7 @@ main(int argc, char *argv[])
setint(global("PPID"), (int64_t) ppid);
/* setstr can't fail here */
setstr(global(version_param), ksh_version, KSH_RETURN_ERROR);
+ setstr(global("OKSH_VERSION"), "oksh 6.8", KSH_RETURN_ERROR);
/* execute initialization statements */
for (wp = (char**) initcoms; *wp != NULL; wp++) {