tb Use % for builtin cmd prefix

This commit is contained in:
2025-09-20 11:38:54 +02:00
parent 6cd4c73438
commit 97bc0aa05b
4 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,3 @@
@print "this is an init script!" %print "this is an init script!"
base:/bin/pctl ls base:/bin/pctl ls
base:/bin/tb -m interactive -preload base:/scripts/rc.tb base:/bin/tb -m interactive -preload base:/scripts/rc.tb

View File

@ -1,2 +1,2 @@
@mkalias pctl base:/bin/pctl %mkalias pctl base:/bin/pctl
@mkalias tb base:/bin/tb %mkalias tb base:/bin/tb

View File

@ -67,7 +67,7 @@ void tz_classify(Tokenizer *tz) {
while (tk) { while (tk) {
if (tk->ptr[0] == '"' && tk->ptr[tk->len - 1] == '"') { if (tk->ptr[0] == '"' && tk->ptr[tk->len - 1] == '"') {
tk->type = TOK_STRING; tk->type = TOK_STRING;
} else if (tk->ptr[0] == '@') { } else if (tk->ptr[0] == '%') {
RtCmd *cmd = RTCMDS; RtCmd *cmd = RTCMDS;
while (cmd) { while (cmd) {
string_memset(tmpbuf, 0, tmpbufsz); string_memset(tmpbuf, 0, tmpbufsz);

View File

@ -47,6 +47,6 @@ bool rt_mkalias(Token *tks) {
} }
void rt_init(void) { void rt_init(void) {
RTCMD("@print", &rt_print); RTCMD("%print", &rt_print);
RTCMD("@mkalias", &rt_mkalias); RTCMD("%mkalias", &rt_mkalias);
} }