tb Use % for builtin cmd prefix
This commit is contained in:
@ -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
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
@mkalias pctl base:/bin/pctl
|
%mkalias pctl base:/bin/pctl
|
||||||
@mkalias tb base:/bin/tb
|
%mkalias tb base:/bin/tb
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user