summaryrefslogtreecommitdiff
path: root/builtins.c
diff options
context:
space:
mode:
authortjg <tjg>1999-10-13 16:10:51 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:16 +0100
commitf7a3ce1bd9e66dc46487b3c9f60d11028b9ff35c (patch)
treeaf12a505e179e2fc526b49d3d61a4f896d8754da /builtins.c
parent32514265eae23c9196b09477c63ab26850ecbe6a (diff)
Feature: replace `-V' with `version' builtin.
Diffstat (limited to 'builtins.c')
-rw-r--r--builtins.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/builtins.c b/builtins.c
index dcea06d..9db974c 100644
--- a/builtins.c
+++ b/builtins.c
@@ -21,7 +21,7 @@
static void b_break(char **), b_cd(char **), b_eval(char **), b_exit(char **),
b_newpgrp(char **), b_return(char **), b_shift(char **), b_umask(char **),
- b_wait(char **), b_whatis(char **);
+ b_version(char **), b_wait(char **), b_whatis(char **);
#if HAVE_SETRLIMIT
static void b_limit(char **);
@@ -51,6 +51,7 @@ static struct {
{ b_return, "return" },
{ b_shift, "shift" },
{ b_umask, "umask" },
+ { b_version, "version" },
{ b_wait, "wait" },
{ b_whatis, "whatis" },
{ b_dot, "." },
@@ -248,6 +249,13 @@ static void b_shift(char **av) {
extern void b_builtin(char **ignore) {
}
+static void b_version(char **ignore) {
+ static const char id[] = "$Release: @(#)" PACKAGE " " VERSION " " RELDATE " $";
+
+ fprint(1, "%s\n", id);
+ set(TRUE);
+}
+
/* wait for a given process, or all outstanding processes */
static void b_wait(char **av) {