Skip to content

Commit

Permalink
Update User Guide for Edit Command
Browse files Browse the repository at this point in the history
  • Loading branch information
WinstonJin committed Oct 16, 2024
1 parent 96aef89 commit 874a251
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default.md
title: "User Guide"
pageNav: 3
title: "User Guide"
pageNav: 3
---

# AB-3 User Guide
Expand All @@ -28,15 +28,15 @@ AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized fo
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>
Some example commands you can try:

* `list` : Lists all contacts.
* `list` : Lists all contacts.

* `add n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 t/Admin` : Adds a contact named `John Doe` to the Address Book.
* `add n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 t/Admin` : Adds a contact named `John Doe` to the Address Book.

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

* `clear` : Deletes all contacts.
* `clear` : Deletes all contacts.

* `exit` : Exits the app.
* `exit` : Exits the app.

1. Refer to the [Features](#features) below for details of each command.

Expand Down Expand Up @@ -64,7 +64,7 @@ AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized fo
e.g. if the command specifies `help 123`, it will be interpreted as `help`.

* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines as space characters surrounding line-breaks may be omitted when copied over to the application.
</box>
</box>

### Viewing help : `help`

Expand All @@ -91,7 +91,7 @@ Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS r/ROLE…​`
5. Events (internal)
6. Events (external)
7. External Relations
</box>
</box>

Examples:
* `add n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 r/Admin`
Expand All @@ -107,15 +107,15 @@ Format: `list`

Edits an existing person in the address book.

Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/ROLE]`
Format: `edit INDEX [n/NAME] [th/TELEGRAM_HANDLE] [e/EMAIL] [a/ADDRESS] [r/ROLE] [nn/NICKNAME]...`

* 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.
* Existing values will be updated to the input values.
* When editing roles, the existing roles of the person will be removed i.e adding of roles is not cumulative.

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 1 th/john_doe123 e/[email protected]` Edits the phone number and email address of the 1st person to be `john_doe123` and `[email protected]` respectively.
* `edit 2 r/Admin r/President` Edits the roles of the 2nd person to be Admin and President, this removes all existing roles user has.

### Locating persons by name: `find`
Expand Down Expand Up @@ -200,11 +200,11 @@ _Details coming soon ..._
## Command summary

Action | Format, Examples
-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------
**Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [r/ROLE]…​` <br> e.g., `add n/James Ho p/22224444 e/[email protected] a/123, Clementi Rd, 1234665 t/Admin t/President`
**Clear** | `clear`
**Delete** | `delete INDEX`<br> e.g., `delete 3`
**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/ROLE]…​`<br> e.g.,`edit 2 n/James Lee e/[email protected]`
**Edit** | `edit INDEX [n/NAME] [th/TELEGRAM_HANDLE] [e/EMAIL] [a/ADDRESS] [r/ROLE] [nn/NICKNAME]…​`<br> e.g.,`edit 2 n/James Lee e/[email protected]`
**Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake`
**List** | `list`
**Help** | `help`

0 comments on commit 874a251

Please sign in to comment.