Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/mycmd/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static void main(String[] args) {
}
} else {
// Single, clear not-recognized message + optional suggestion
System.out.println("'" + cmd + "' is not recognized as an internal or external command.");
System.out.println("Unknown command: '" + cmd + "'. Enter 'help' to list all available commands.");

// compute suggestion safely
try {
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/mycmd/commands/DateCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,14 @@ public class DateCommand implements Command {
public void execute(String[] args, ShellContext context) {
System.out.println("The current date is: " + java.time.LocalDate.now());
}

@Override
public String description() {
return "Display current date.";
}

@Override
public String usage() {
return "date";
}
}