From 76d8a735b54f528f1bef8d67207862bc6db493a4 Mon Sep 17 00:00:00 2001 From: Niklas Halle Date: Sun, 24 May 2020 17:29:04 +0200 Subject: small welcome message, telling what the shell can do --- 02_exercise/shell.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/02_exercise/shell.c b/02_exercise/shell.c index 35de455..20156b2 100644 --- a/02_exercise/shell.c +++ b/02_exercise/shell.c @@ -13,6 +13,15 @@ int main(void) { setvbuf(stderr, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); + printf("Welcome! Available built-ins are:\n" + "cd: `cd ` - if no path is given, return to the current dir\n" + "wait: `wait pid1 ... pidN` - wait on the processes and report their exit conditions\n" + "fg: `fg pid` - pulls a process from the background back in the foreground (#TODO)\n" + "\n" + "You can put processes in the background using the unary `&` for new processes, and using CTRL-Z (#TODO) for already running ones\n" + "With `|` you can pipe the output from one process to the input of another\n" + ); + char const *const original_wd = get_current_dir_name(); char const *prompt = relative_path(original_wd, original_wd); bool done = false; -- cgit v1.2.3-54-g00ecf