Skip to content

Commit

Permalink
Merge pull request #90 from chrisjohntan/update-userguide
Browse files Browse the repository at this point in the history
Update user guide
  • Loading branch information
CYX22222003 authored Oct 17, 2024
2 parents cfc8d74 + 162eeae commit f41204e
Showing 1 changed file with 32 additions and 16 deletions.
48 changes: 32 additions & 16 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected] a/John street, block 123, #01-01` : Adds a contact named `John Doe` to the Address Book.
* `add n/John Doe p/98765432 e/[email protected]` : Adds a contact named `John Doe` with phone number `98765432` and email `[email protected]` to the Address Book.

* `delete 3` : Deletes the 3rd contact shown in the current list.

Expand Down Expand Up @@ -79,16 +79,16 @@ 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]…​`

<box type="tip" seamless>

**Tip:** A person can have any number of tags (including 0)
</box>

Examples:
* `add n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01`
* `add n/Betsy Crowe t/friend e/[email protected] a/Newgate Prison p/1234567 t/criminal`
* `add n/John Doe p/98765432 e/[email protected]`
* `add n/Betsy Crowe t/friend e/[email protected] p/1234567 t/criminal`

### Listing all persons : `list`

Expand All @@ -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.
Expand All @@ -113,23 +113,36 @@ Examples:
* `edit 1 p/91234567 e/[email protected]` Edits the phone number and email address of the 1st person to be `91234567` and `[email protected]` 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`<br>
![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`<br>
![result for 'find n/alex david'](images/findAlexDavidResult.png)

Disallowed examples:
* `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`

Expand All @@ -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`

Expand Down Expand Up @@ -196,10 +209,13 @@ _Details coming soon ..._

Action | Format, Examples
-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------
**Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​` <br> e.g., `add n/James Ho p/22224444 e/[email protected] a/123, Clementi Rd, 1234665 t/friend t/colleague`
**Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL [t/TAG]…​` <br> e.g., `add n/James Ho p/22224444 e/[email protected] t/friend t/colleague`
**Clear** | `clear`
**Delete** | `delete INDEX`<br> e.g., `delete 3`
**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`<br> e.g.,`edit 2 n/James Lee e/[email protected]`
**Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake`
**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [t/TAG]…​`<br> e.g.,`edit 2 n/James Lee e/[email protected]`
**Find by name** | `find n/KEYWORD [MORE_KEYWORDS]`<br> e.g., `find n/James Jake`
**Find by email** | `find e/KEYWORD [MORE_KEYWORDS]`<br> e.g., `find e/[email protected] [email protected]`
**Find by phone number** | `find p/KEYWORD [MORE_KEYWORDS]`<br> e.g., `find p/91234657 85432789`
**Find by tag** | `find t/KEYWORD [MORE_KEYWORDS]`<br> e.g., `find t/friend roommate`
**List** | `list`
**Help** | `help`

0 comments on commit f41204e

Please sign in to comment.