Fix error printf on oshell project
This commit is contained in:
@@ -46,13 +46,13 @@ int main(void) {
|
|||||||
if (nth_command(raw, history_count) != -1) {
|
if (nth_command(raw, history_count) != -1) {
|
||||||
printf("%s\n", raw);
|
printf("%s\n", raw);
|
||||||
} else {
|
} else {
|
||||||
printf("History is empty\n");
|
fprintf(stderr, "History is empty\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if ((c = strchr(raw, '!')) != NULL) {
|
} else if ((c = strchr(raw, '!')) != NULL) {
|
||||||
const int n = digits(c);
|
const int n = digits(c);
|
||||||
if (nth_command(raw, n) != -1) {
|
if (nth_command(raw, n) != -1) {
|
||||||
printf("%s\n", raw);
|
fprintf(stderr, "%s\n", raw);
|
||||||
} else {
|
} else {
|
||||||
printf("Command not found in position %d\n", n);
|
printf("Command not found in position %d\n", n);
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user