josphat-kahihia / simple_shell

0 stars 0 forks source link

Add support for non-interactive mode (!tty input streams) #5

Open josphat-kahihia opened 2 months ago

josphat-kahihia commented 2 months ago

The shell can only work in interactive mode (from the terminal). Add support for non-terminal input streams such as pipes.

josphat-kahihia commented 2 months ago

This is separate from #6 as it still reads from stdin, but shouldn't prompt the user, and should keep a line count e.g.:

 ./a.out: 1: ls: No such file or directory

whereas #6 should read from the provided file only, writing to stderr on errors.