auto load rc.tb script

This commit is contained in:
2025-10-12 14:13:22 +02:00
parent c0f91dcced
commit 5aebc61c06
5 changed files with 8 additions and 11 deletions

View File

@ -21,8 +21,6 @@ struct {
bool logcmds;
char *preloadpath;
char *runstring;
} CONFIG;
@ -30,7 +28,6 @@ static Arg ARGS[] = {
ARG("-m", ARG_STRING, &CONFIG.modestr),
ARG("-f", ARG_STRING, &CONFIG.filepath),
ARG("-logcmds", ARG_BOOL, &CONFIG.logcmds),
ARG("-preload", ARG_STRING, &CONFIG.preloadpath),
ARG("-rs", ARG_STRING, &CONFIG.runstring),
ARG_END(),
};
@ -153,9 +150,7 @@ void main(void) {
set_config();
if (CONFIG.preloadpath != NULL) {
do_file(CONFIG.preloadpath);
}
do_file("base:/scripts/rc.tb");
if (CONFIG.mode == MODE_INTERACTIVE) {
devctl(&ps2kbdev, DEVCTL_GET_HANDLE, (uint8_t *)"ps2kbdev", 0, 0);

View File

@ -86,7 +86,7 @@ bool rt_PID(Token *tks) {
bool rt_do(Token *tks) {
bool ok = true;
char *prepended_args[] = { "-m", "runstring", "-preload", "base:/scripts/rc.tb", "-rs" };
char *prepended_args[] = { "-m", "runstring", "-rs" };
#define SUBSH_MAX_STRING PROC_ARG_MAX
char *s = umalloc(SUBSH_MAX_STRING);