Meta: Add files to repository
This commit is contained in:
parent
80a0428b66
commit
39198164cd
1029 changed files with 78311 additions and 0 deletions
14
System/Shell/Commands/history.HC
Normal file
14
System/Shell/Commands/history.HC
Normal file
|
@ -0,0 +1,14 @@
|
|||
I64 @shell_cmd_history(@shell* sh, I64 argc, U8** argv)
|
||||
{
|
||||
I64 i;
|
||||
I64 j;
|
||||
U8 buf[512];
|
||||
for (i = 0; i < sh->history.pos; i++) {
|
||||
StrPrint(&buf, "%05d %s\n", i + 1, sh->history.entries[i]);
|
||||
j = 0;
|
||||
while (buf[j] == '0')
|
||||
buf[j++] = ' ';
|
||||
Stdio.WriteLine(sh, &buf);
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue