aboutsummaryrefslogtreecommitdiff
path: root/sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'sh.c')
-rw-r--r--sh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sh.c b/sh.c
index 9f67f1c91..cd27e468b 100644
--- a/sh.c
+++ b/sh.c
@@ -145,6 +145,7 @@ static struct builtInCommand bltins[] = {
145 {"export", "Set environment variable", builtin_export}, 145 {"export", "Set environment variable", builtin_export},
146 {"unset", "Unset environment variable", builtin_unset}, 146 {"unset", "Unset environment variable", builtin_unset},
147 {"read", "Input environment variable", builtin_read}, 147 {"read", "Input environment variable", builtin_read},
148 {".", "Source-in and run commands in a file", builtin_source},
148#ifdef BB_FEATURE_SH_IF_EXPRESSIONS 149#ifdef BB_FEATURE_SH_IF_EXPRESSIONS
149 {"if", NULL, builtin_if}, 150 {"if", NULL, builtin_if},
150 {"then", NULL, builtin_then}, 151 {"then", NULL, builtin_then},
@@ -159,7 +160,6 @@ static struct builtInCommand bltins[] = {
159static struct builtInCommand bltins_forking[] = { 160static struct builtInCommand bltins_forking[] = {
160 {"env", "Print all environment variables", builtin_env}, 161 {"env", "Print all environment variables", builtin_env},
161 {"pwd", "Print current directory", builtin_pwd}, 162 {"pwd", "Print current directory", builtin_pwd},
162 {".", "Source-in and run commands in a file", builtin_source},
163 {"help", "List shell built-in commands", builtin_help}, 163 {"help", "List shell built-in commands", builtin_help},
164 {NULL, NULL, NULL} 164 {NULL, NULL, NULL}
165}; 165};
@@ -500,6 +500,7 @@ static int builtin_source(struct job *cmd, struct jobSet *junk)
500 500
501 /* Now run the file */ 501 /* Now run the file */
502 status = busy_loop(input); 502 status = busy_loop(input);
503 fclose(input);
503 return (status); 504 return (status);
504} 505}
505 506