tb Command-like scripts
This commit is contained in:
@ -134,6 +134,16 @@ void do_mode_interactive(void) {
|
||||
void main(void) {
|
||||
PID = proc_getpid();
|
||||
|
||||
// short command-like script was supplied
|
||||
if (argslen() > 0 && args()[0][0] == '.') {
|
||||
do_file("base:/scripts/rc.tb");
|
||||
char *path = umalloc(4096);
|
||||
usprintf(path, "base:/scripts/%s.tb", args()[1]);
|
||||
do_file(path);
|
||||
ufree(path);
|
||||
return;
|
||||
}
|
||||
|
||||
set_config();
|
||||
|
||||
do_file("base:/scripts/rc.tb");
|
||||
|
||||
Reference in New Issue
Block a user