From 79a0bc835b0434c77f2bfad55dcbb3cd500efe6e Mon Sep 17 00:00:00 2001 From: Christopher Tan Date: Thu, 17 Oct 2024 00:43:12 +0800 Subject: [PATCH 1/3] Remove mention of contact address and address prefixes --- docs/UserGuide.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 69a5b15b0a5..9272af4b1f9 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -30,7 +30,7 @@ CampusConnect(CC) is a **desktop app for managing contacts, optimized for use vi * `list` : Lists all contacts. - * `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` : Adds a contact named `John Doe` to the Address Book. + * `add n/John Doe p/98765432 e/johnd@example.com` : Adds a contact named `John Doe` with phone number `98765432` and email `johnd@example.com` to the Address Book. * `delete 3` : Deletes the 3rd contact shown in the current list. @@ -79,7 +79,7 @@ Format: `help` Adds a person to the address book. -Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​` +Format: `add n/NAME p/PHONE_NUMBER e/EMAIL [t/TAG]…​` @@ -87,8 +87,8 @@ Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​` Examples: -* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` -* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal` +* `add n/John Doe p/98765432 e/johnd@example.com` +* `add n/Betsy Crowe t/friend e/betsycrowe@example.com p/1234567 t/criminal` ### Listing all persons : `list` @@ -100,7 +100,7 @@ Format: `list` Edits an existing person in the address book. -Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…​` +Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [t/TAG]…​` * Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index **must be a positive integer** 1, 2, 3, …​ * At least one of the optional fields must be provided. @@ -196,10 +196,10 @@ _Details coming soon ..._ Action | Format, Examples -----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------- -**Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague` +**Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL [t/TAG]…​`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com t/friend t/colleague` **Clear** | `clear` **Delete** | `delete INDEX`
e.g., `delete 3` -**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` +**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [t/TAG]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` **Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` **List** | `list` **Help** | `help` From fa8090ac3104530bb6d2010617252dd345682a1f Mon Sep 17 00:00:00 2001 From: Christopher Tan Date: Thu, 17 Oct 2024 01:23:38 +0800 Subject: [PATCH 2/3] Update find command to match the updated format --- docs/UserGuide.md | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 9272af4b1f9..0515d442a1c 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -113,23 +113,36 @@ Examples: * `edit 1 p/91234567 e/johndoe@example.com` Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively. * `edit 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags. -### Locating persons by name: `find` +### Locating persons by contact information: `find` -Finds persons whose names contain any of the given keywords. +Finds persons whose names, email address, contact number, or tag contain any of the given keywords. -Format: `find KEYWORD [MORE_KEYWORDS]` +Format: +`find n/KEYWORD [MORE_KEYWORDS]` + +`find p/KEYWORD [MORE_KEYWORDS]` + +`find e/KEYWORD [MORE_KEYWORDS]` + +`find t/KEYWORD [MORE_KEYWORDS]` + + +* Only one field type can be specified per command. +* Only the specified field is searched. * The search is case-insensitive. e.g `hans` will match `Hans` * The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans` -* Only the name is searched. * Only full words will be matched e.g. `Han` will not match `Hans` * Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang` Examples: -* `find John` returns `john` and `John Doe` -* `find alex david` returns `Alex Yeoh`, `David Li`
- ![result for 'find alex david'](images/findAlexDavidResult.png) +* `find n/John` returns `john` and `John Doe` +* `find n/alex david` returns `Alex Yeoh`, `David Li`
+ ![result for 'find n/alex david'](images/findAlexDavidResult.png) + +Disallowed examples: +* `find n/John p/82345670` will be rejected, as the command only searches on single fields. ### Deleting a person : `delete` @@ -143,7 +156,7 @@ Format: `delete INDEX` Examples: * `list` followed by `delete 2` deletes the 2nd person in the address book. -* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command. +* `find n/Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command. ### Clearing all entries : `clear` @@ -200,6 +213,9 @@ Action | Format, Examples **Clear** | `clear` **Delete** | `delete INDEX`
e.g., `delete 3` **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [t/TAG]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` -**Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` +**Find by name** | `find n/KEYWORD [MORE_KEYWORDS]`
e.g., `find n/James Jake` +**Find by email** | `find e/KEYWORD [MORE_KEYWORDS]`
e.g., `find e/bigman123@email.com bobbyrick@example.com` +**Find by phone number** | `find p/KEYWORD [MORE_KEYWORDS]`
e.g., `find p/91234657 85432789` +**Find by tag** | `find t/KEYWORD [MORE_KEYWORDS]`
e.g., `find t/friend roommate` **List** | `list` **Help** | `help` From 162eeae5af3840d7d2a3a3cbe2899ee28b0dd90d Mon Sep 17 00:00:00 2001 From: Christopher Tan Date: Thu, 17 Oct 2024 01:30:15 +0800 Subject: [PATCH 3/3] Update find command to match the updated format --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 0515d442a1c..677632dbfba 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -142,7 +142,7 @@ Examples: ![result for 'find n/alex david'](images/findAlexDavidResult.png) Disallowed examples: -* `find n/John p/82345670` will be rejected, as the command only searches on single fields. +* `find n/John p/82345670` will not succeed as intended, as the command only searches on single fields. "`p/82345670`" will be treated as a keyword string. ### Deleting a person : `delete`