diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 5bbcbc9edf8..faf7714fdde 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -133,6 +133,41 @@ Output:
+### 4. Editing a person: `editPerson` + +Enables you to change the details or particulars of an existing contact in your contact list. + +Format: + +``` +editPerson INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [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. +- Existing values will be updated to the input values. +- When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative. +- You can remove all the person’s tags by typing `t/` without specifying any tags after it. + +Examples: + +- `editPerson 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. +- `editPerson 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags. + +Output: + +![editPerson success](images/editPerson_success.png) + +Errors: + +- Incorrect parameters or command format +![editPerson error](images/error/editPerson_error.png) + +- Incorrect or missing index +![editPerson wrongIndex](images/error/editPerson_wrongIndex.png) + + + ### 7. Clearing all person entries: `deleteAllPerson` @@ -255,6 +290,90 @@ Errors: ![deleteTask_error](images/error/deleteTask_error1.png) + + +### 13. Clearing all task entries: `deleteAllTask` + +{% include admonition.html type="danger" title="Potentially Dangerous Operation!" body=" +AddressBook will discard all Task data and start with an empty data file at the next run.