Skip to content

Commit 3180fd3

Browse files
Improve source command feedback
Enhance the "source" command by providing clearer feedback to users. Now, if no source file is specified, the message explicitly suggests using "source <file>" for better clarity. Additionally, a message is printed when sourcing a file, improving user awareness. Co-authored-by: JimmyChongz <[email protected]> Change-Id: Ia1f5b9118ee369850ac6cc68f4e8344114c34a15
1 parent 9711c67 commit 3180fd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

console.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,15 +355,15 @@ static bool do_option(int argc, char *argv[])
355355
static bool do_source(int argc, char *argv[])
356356
{
357357
if (argc < 2) {
358-
report(1, "No source file given");
358+
report(1, "No source file given. Use 'source <file>'.");
359359
return false;
360360
}
361361

362362
if (!push_file(argv[1])) {
363363
report(1, "Could not open source file '%s'", argv[1]);
364364
return false;
365365
}
366-
366+
printf("Sourcing from: %s\n", argv[1]);
367367
return true;
368368
}
369369

0 commit comments

Comments
 (0)