Skip to content

Commit 46a1d92

Browse files
authored
Merge pull request #220 from reynardian/user-guide-pe-d
Update User Guide for find command and fix minor documentation bugs
2 parents 506fb61 + 4bc1dbb commit 46a1d92

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

docs/UserGuide.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Optimized for a Command Line Interface (CLI), CareContacts is ideal for fast typ
2525
1. Copy the file to the folder you want to use as the _home folder_ for your AddressBook.
2626

2727
1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar carecontacts.jar` command to run the application.<br>
28-
A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.<br>
28+
A Graphical User Interface (GUI) similar to the below should appear in a few seconds. Note how the app contains some sample data.<br>
2929
![Ui](images/Ui.png)
3030

3131
1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.<br>
@@ -148,7 +148,7 @@ Format: `edit INDEX [n/NAME] [a/AGE] [ad/ADDRESS] [pn/PARENT NAME] [pc/PARENT PH
148148

149149
Examples:
150150
* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.
151-
* `edit 3 pn/91234567 pe/johndoe@example.com` Edits the phone number and email address of the 3rd person's parent to be `91234567` and `johndoe@example.com` respectively.
151+
* `edit 3 pc/91234567 pe/johndoe@example.com` Edits the phone number and email address of the 3rd person's parent to be `91234567` and `johndoe@example.com` respectively.
152152

153153
### Locating persons by name: `find`
154154

@@ -158,10 +158,13 @@ Format: `find [NAME] [n/NAME] [a/AGE] [ad/ADDRESS] [t/TAG] [pn/PARENT_NAME] [pc/
158158

159159
* The search is case-insensitive. e.g `hans` will match `Hans`
160160
* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`
161-
* If the keyword follows the prefix, the search returns contacts that match ANY of the given keywords (OR search) if they match the specified parameter for the specific prefix.
162-
* If no prefix is specified (e.g., n/, a/, pn/, pe/), the search will default to student name (n/).
161+
* If the keyword follows the prefix, the search returns contacts that match ANY of the given keywords (`OR` search) if they match the specified parameter for the specific prefix.
162+
* If no prefix is specified (e.g., `n/`, `a/`, `pn/`, `pe/`), the search will default to student name (`n/`).
163+
* Prefixes can be used multiple times. If you provide multiple instances of the same prefix (e.g., `find a/10 a/12`), the search will return results that match any of those values.
164+
* Preamble keywords and the `n/` prefix both target student names; you can use either or both to filter by name (e.g., `find Hans Bo`, `find n/Hans Bo`, and `find Hans n/Bo` yield the same result).
163165
* The search matches partial words (e.g., `jacob` will match `jacobyu@email.com`, `Justin` will match `Justinian`) except for the age prefix.
164-
* Searching by age uses an exact match instead of a partial match (e.g., a/12 will not match a student who is 1).
166+
* Searching by age uses an exact match instead of a partial match (e.g., `a/12` will not match a student who is 1).
167+
* Searching by address (`ad/`) supports phrase matching; keywords are not split by spaces. e.g. `ad/Blk 20` will match `Blk 201` but not `Blk 30`.
165168
* Persons matching at least one keyword will be returned (i.e. `OR` search).
166169
e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`
167170
* At least one of the optional fields must be provided.
@@ -172,6 +175,7 @@ Examples:
172175
* `find John` returns `john` and `John Doe`
173176
* `find alex david` returns `Alex Yeoh`, `David Li`<br>
174177
* `find alex david n/john` returns `Alex Yeoh`, `David Li`, and `John Doe`
178+
* `find ad/Blk 30 Geylang` returns all contacts living at that specific block and street. The search treats the entire string following ad/ as a single location fragment.
175179
* `find n/Jacob pn/Madison` returns students whose name contains `Jacob` and students whose parent's name contains `Madison`
176180
![result for 'find alex david'](images/findAlexDavidResult.png)
177181
* `find n/Alice pn/Tan a/12` returns all students named `Alice`, and students whose parent's name contains `Tan`, and students who are exactly 12 years old.

0 commit comments

Comments
 (0)