nixpulvis / oursh

Your comrade through the perilous world of UNIX.
http://nixpulvis.com/oursh/oursh
MIT License
67 stars 6 forks source link

Interactive Mode #46

Open nixpulvis opened 5 years ago

nixpulvis commented 5 years ago

We're building a nice repl module for interaction with the terminal. This is called interactive mode. From the sh man page:

If the −i option is present, or if there are no operands and the shell's standard input and standard error are attached to a terminal, the shell is considered to be interactive.

We should implement the -i and --interactive flags, and tweak the code to check the interactive mode in addition to just is_tty(&stdin).