SHELL 0.8 changelog

- added mv command
- added ren command
- now ls works also with relative pathes
- fixed bug in strrchr

git-svn-id: svn://kolibrios.org@7802 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Rustem Gimadutdinov (rgimad)
2020-04-16 21:50:49 +00:00
parent d802f7476f
commit b8b18f32a0
10 changed files with 388 additions and 122 deletions

View File

@@ -41,6 +41,20 @@ for (;;i--)
break;
}
}
/// ===========================================================
void get_file_dir_loc(char *filepath, char *dir_path)
{
char *res = strrchr(filepath, '/');
if (res == 0)
{
dir_path = '\0';
return;
}
size_t pos = res - filepath;
strncpy(dir_path, filepath, pos);
dir_path[pos] = '\0';
}
/// ===========================================================
@@ -160,7 +174,9 @@ command_execute();
for (;;)
{
//printf("\033[32;1m");
printf ("# ");
//printf("\033[0m");
command_get();
command_execute();
}