From cd7861dbce5ed272c331e9c80cf8d348b1cea8d9 Mon Sep 17 00:00:00 2001 From: Samantha Boyer Date: Sat, 22 Oct 2022 20:47:03 -0500 Subject: [PATCH] Made changes to getInput() --- src/Pish.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Pish.c b/src/Pish.c index cac9605..9241d98 100644 --- a/src/Pish.c +++ b/src/Pish.c @@ -2,13 +2,20 @@ #include #include #include +#include #include "Integrated.h" #include "Pish.h" // Prints a prompt and then reads a command from the terminal char* getInput(void) { - return "echo hello world"; + char prompt = '$'; + char *commandLine; + + printf("%c ", prompt); + scanf("%[^\n]", commandLine); + + return commandLine; } // Executes a command to the system