Skip to content

Commit

Permalink
UG
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxunn committed Nov 9, 2023
1 parent a3d3eb6 commit 9c6f906
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ D.A.V.E. is here to enhance your advisory journey by simplifying information man
- [Sort meeting time](#sort-meeting-time)
- [Convert lead to client](#convert-lead-to-client)
- [Convert client to lead](#convert-client-to-lead)
- [Locating person by name](#locating-person-by-name)
- [Locating persons by name](#locating-persons-by-name)
- [Clear address book](#clear-address-book)
- [Exit the program](#exit-the-program)
- [FAQ](#faq)
Expand Down Expand Up @@ -576,12 +576,12 @@ from current date to ensure a follow-up by the user.
`The person index provided is invalid`


### Locating person by name
### Locating persons 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:

`<NUMBER> persons listed!`
Expand All @@ -596,9 +596,11 @@ Example: find alice bob charlie
```

<box type="info">
The search is case-insensitive. e.g <code>John</code> will match <code>john</code>.
Only full words will be matched e.g. <code>John</code> will not match <code>Johns</code>.
Persons matching at least one keyword will be returned (i.e. OR search). e.g. <code>find john david</code> will return <code>John Doe</code>, <code>David Li</code>.
<ul>
<li>The search is case-insensitive. e.g. <code>John</code> will match <code>john</code>.</li>
<li>Only full words will be matched. e.g. <code>John</code> will not match <code>Johns</code>.</li>
<li>Persons matching at least one keyword will be returned (i.e. OR search). e.g. <code>find john david</code> will return <code>John Doe</code>, <code>David Li</code>.</li>
</ul>
</box>

Example usage:
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/logic/commands/FindCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9c6f906

Please sign in to comment.