Skip to content

Commit

Permalink
Update System.js
Browse files Browse the repository at this point in the history
  • Loading branch information
withinJoel authored Oct 16, 2024
1 parent ebbc917 commit 318be93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Modules/System.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,17 +220,17 @@ const commandDictionary = {
// Function to handle user input
function whatIsCommand(input) {
// Check if the input starts with 'whatis'
if (input.startsWith('whatis ')) {
if (input.startsWith('whatis: ')) {
// Extract the command from the input
const command = input.split(' ')[1];

// Look up the command in the dictionary
const meaning = commandDictionary[command];

// Return the meaning or a message if the command is not found
return meaning ? meaning : `Command '${command}' not found.`;
return meaning ? meaning : echo(`Command '${command}' not found.`);
} else {
return "Please use the format 'whatis <command>'.";
echo("Please use the format 'whatis <command>'.");
}
}

Expand Down

0 comments on commit 318be93

Please sign in to comment.