Implement the “source” command, as requested by some and agreed bsiegert@

In contrast to AT&T ksh93, its semantics are like GNU bash in that it ap-
pends the current working directory to the search path; it is implemented
as a shell alias instead of enhancing funcs.c:shbuiltins[] like in ksh93.
This commit is contained in:
tg
2007-08-13 19:39:21 +00:00
parent 7381c6c274
commit f684b0ceb1
4 changed files with 27 additions and 7 deletions

3
main.c
View File

@ -13,7 +13,7 @@
#include <locale.h>
#endif
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.85 2007/08/12 13:42:21 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.86 2007/08/13 19:39:19 tg Exp $");
extern char **environ;
@ -49,6 +49,7 @@ static const char *initcoms_korn[] = {
"history=fc -l",
"nohup=nohup ",
"r=fc -e -",
"source=PATH=$PATH:. command .",
"login=exec login",
NULL,
/* this is what at&t ksh seems to track, with the addition of emacs */