Made changes to getInput()
This commit is contained in:
		
							parent
							
								
									4c7cf3bd3b
								
							
						
					
					
						commit
						cd7861dbce
					
				@ -2,13 +2,20 @@
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#include <sys/wait.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user