diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 44e573d7bda..aa5dce2276f 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -47,9 +47,10 @@ Here are some descriptions of the words we use throughout the User Guide: # Features -> [!NOTE] -> Extraneous parameters for commands that do not take in parameters (such as help, exit and clear) will be ignored. + +Extraneous parameters for commands that do not take in parameters (such as help, exit and clear) will be ignored. e.g. if the command specifies `exit 2`, it will be interpreted as the `exit` command. + ### Add lead @@ -435,10 +436,10 @@ from current date to ensure a follow-up by the user. ### Locating person by name - What it does: Finds persons whose names contain any of the given keywords. -- Command format: `find NAME [MORE_NAMES]` +- Command format: `find KEYWORD [MORE_KEYWORDS]` - Example usage: `find John David` - Acceptable values for parameter: - - `NAME`: Any name from the list. + - `KEYWORD`: Any name from the list. - Precise expected output when the command succeeds: ` persons listed!` @@ -446,14 +447,13 @@ from current date to ensure a follow-up by the user. - Precise expected output when the command fails: ``Invalid command format! -find: Finds all persons whose names contain any of the specified names (case-insensitive) and displays them as a list with index numbers. -Parameters: NAME [MORE_NAMES]... +find: Finds all persons whose names contain any of the specified keywords (case-insensitive) and displays them as a list with index numbers. +Parameters: KEYWORD [MORE_KEYWORDS]... Example: find alice bob charlie`` ->[!NOTE] ->- The search is case-insensitive. e.g `John` will match `john`. ->- Only full words will be matched e.g. `John` will not match `Johns`. ->- Persons matching at least one keyword will be returned (i.e. OR search). e.g. `find john david` will return `John Doe`, `David Li` + +The search is case-insensitive. e.g `John` will match `john`. Only full words will be matched e.g. `John` will not match `Johns`. Persons matching at least one keyword will be returned (i.e. OR search). e.g. `find john david` will return `John Doe`, `David Li` + Example usage: @@ -469,9 +469,12 @@ Example usage: ### Clear - What it does: Clears all entries from the address book. + + + This command will delete all the data from the address book. This command cannot be reversed. Proceed with caution. + + - Command format: `clear`. -> [!WARNING] -> This command will delete all the data from the address book. This command cannot be reversed. Proceed with caution. - Precise expected output when the command succeeds: `Address book has been cleared!` diff --git a/src/main/java/seedu/address/logic/commands/FindCommand.java b/src/main/java/seedu/address/logic/commands/FindCommand.java index f04b419c6ef..72b9eddd3a7 100644 --- a/src/main/java/seedu/address/logic/commands/FindCommand.java +++ b/src/main/java/seedu/address/logic/commands/FindCommand.java @@ -16,8 +16,8 @@ public class FindCommand extends Command { public static final String COMMAND_WORD = "find"; public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons whose names contain any of " - + "the specified names (case-insensitive) and displays them as a list with index numbers.\n" - + "Parameters: NAME [MORE_NAMES]...\n" + + "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n" + + "Parameters: KEYWORD [MORE_KEYWORDS]...\n" + "Example: " + COMMAND_WORD + " alice bob charlie"; private final NameContainsKeywordsPredicate predicate;