tb Implement "#" comments
This commit is contained in:
@ -1,3 +1,6 @@
|
|||||||
print 'Mounting filesystems...\n'
|
print 'Mounting filesystems...\n'
|
||||||
setlogcmds yes
|
setlogcmds yes
|
||||||
|
|
||||||
|
# MOUNTPOINT FILESYSTEM DEVICE NAME DO FORMATTING
|
||||||
|
|
||||||
$fs mount -mp uhome -fs LittleFS -dev atasd-ch0-M-part2 -fmt no
|
$fs mount -mp uhome -fs LittleFS -dev atasd-ch0-M-part2 -fmt no
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
|
# Create an $alias out of basenames of each entry in base:/bin
|
||||||
eachfile !.gitkeep base:/bin \
|
eachfile !.gitkeep base:/bin \
|
||||||
mkaliasbn &EF-ELEM
|
mkaliasbn &EF-ELEM
|
||||||
|
|||||||
@ -193,18 +193,22 @@ bool interp_runstring(char *string, InterpResult **res, bool interactive) {
|
|||||||
|
|
||||||
char *line = string_tokenizealloc_linecontinue(string, "\n");
|
char *line = string_tokenizealloc_linecontinue(string, "\n");
|
||||||
while (line != NULL) {
|
while (line != NULL) {
|
||||||
if (CONFIG.logcmds) {
|
|
||||||
uprintf("+"ANSIQ_SETFG_YELLOW"%s"ANSIQ_GR_RESET"\n", line);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool skip;
|
bool skip;
|
||||||
STRING_CHECK_ALL(line, string_chr_isspace, skip);
|
STRING_CHECK_ALL(line, string_chr_isspace, skip);
|
||||||
|
if (line[0] == '#') {
|
||||||
|
skip = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (skip) {
|
if (skip) {
|
||||||
ufree(line);
|
ufree(line);
|
||||||
line = string_tokenizealloc_linecontinue(NULL, "\n");
|
line = string_tokenizealloc_linecontinue(NULL, "\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CONFIG.logcmds) {
|
||||||
|
uprintf("+"ANSIQ_SETFG_YELLOW"%s"ANSIQ_GR_RESET"\n", line);
|
||||||
|
}
|
||||||
|
|
||||||
Tokenizer tz; ZERO(&tz);
|
Tokenizer tz; ZERO(&tz);
|
||||||
tz_init(&tz, line);
|
tz_init(&tz, line);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user