From 63314a83630e26fe0170d6143fcfe16db3614c42 Mon Sep 17 00:00:00 2001 From: "Enrico Fraccaroli (Galfurian)" Date: Fri, 11 Aug 2023 13:29:01 -0400 Subject: [PATCH] Improve cd command output. --- programs/shell.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/shell.c b/programs/shell.c index 9055038..5d0d7f9 100644 --- a/programs/shell.c +++ b/programs/shell.c @@ -291,7 +291,7 @@ static int __cd(int argc, char *argv[]) } else { path = getenv("HOME"); if (path == NULL) { - printf("cd: There is no home directory set.\n"); + printf("cd: There is no home directory set.\n\n"); return 1; } } @@ -311,6 +311,7 @@ static int __cd(int argc, char *argv[]) printf("cd: Failed to set current working directory.\n"); return 1; } + putchar('\n'); return 0; }