*polished shell.

This commit is contained in:
Wang Renxin 2016-12-22 23:28:22 +08:00
parent 029ba170cd
commit 3afe5b7e03
2 changed files with 892 additions and 883 deletions

View File

@ -1,3 +1,6 @@
Dec. 22 2016
Improved shell prompting when removing a non-exist file
Dec. 21 2016
Improved parsing context maintaining

View File

@ -927,7 +927,13 @@ static void _kill_program(const char* path) {
if(!unlink(path)) {
_printf("Delete file \"%s\" successfully.\n", path);
} else {
FILE* fp = fopen(path, "rb");
if(fp) {
fclose(fp);
_printf("Delete file \"%s\" failed.\n", path);
} else {
_printf("File \"%s\" not found.\n", path);
}
}
}