forked from se-edu/addressbook-level2
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[W5][T12-1] Zhang Shaoqian #175
Open
nerrons
wants to merge
3
commits into
nus-cs2103-AY1819S2:master
Choose a base branch
from
nerrons:pretty-printing-help
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
import seedu.addressbook.data.person.ReadOnlyPerson; | ||
import seedu.addressbook.data.person.UniquePersonList; | ||
import seedu.addressbook.data.tag.Tag; | ||
import static seedu.addressbook.ui.TextUi.INDENT_1; | ||
|
||
/** | ||
* Adds a person to the address book. | ||
|
@@ -22,8 +23,8 @@ public class AddCommand extends Command { | |
|
||
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a person to the address book. " | ||
+ "Contact details can be marked private by prepending 'p' to the prefix.\n" | ||
+ "Parameters: NAME [p]p/PHONE [p]e/EMAIL [p]a/ADDRESS [t/TAG]...\n" | ||
+ "Example: " + COMMAND_WORD | ||
+ INDENT_1 + "Parameters: NAME [p]p/PHONE [p]e/EMAIL [p]a/ADDRESS [t/TAG]...\n" | ||
+ INDENT_1 + "Example: " + COMMAND_WORD | ||
+ " John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney"; | ||
|
||
public static final String MESSAGE_SUCCESS = "New person added: %1$s"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,28 +7,28 @@ | |
|| =================================================== | ||
|| Enter command: || [Command entered: sfdfd] | ||
|| add: Adds a person to the address book. Contact details can be marked private by prepending 'p' to the prefix. | ||
|| Parameters: NAME [p]p/PHONE [p]e/EMAIL [p]a/ADDRESS [t/TAG]... | ||
|| Example: add John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney | ||
|| Parameters: NAME [p]p/PHONE [p]e/EMAIL [p]a/ADDRESS [t/TAG]... | ||
|| Example: add John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney | ||
|| delete: Deletes the person identified by the index number used in the last person listing. | ||
|| Parameters: INDEX | ||
|| Example: delete 1 | ||
|| Clears address book permanently. | ||
|| Example: clear | ||
|| Parameters: INDEX | ||
|| Example: delete 1 | ||
|| clear: Clears address book permanently. | ||
|| Example: clear | ||
|| find: Finds all persons whose names contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers. | ||
|| Parameters: KEYWORD [MORE_KEYWORDS]... | ||
|| Example: find alice bob charlie | ||
|| Parameters: KEYWORD [MORE_KEYWORDS]... | ||
|| Example: find alice bob charlie | ||
|| list: Displays all persons in the address book as a list with index numbers. | ||
|| Example: list | ||
|| Example: list | ||
|| view: Views the non-private details of the person identified by the index number in the last shown person listing. | ||
|| Parameters: INDEX | ||
|| Example: view 1 | ||
|| Parameters: INDEX | ||
|| Example: view 1 | ||
|| viewall: Views the non-private details of the person identified by the index number in the last shown person listing. | ||
|| Parameters: INDEX | ||
|| Example: viewall 1 | ||
|| Parameters: INDEX | ||
|| Example: viewall 1 | ||
|| help: Shows program usage instructions. | ||
|| Example: help | ||
|| Example: help | ||
|| exit: Exits the program. | ||
|| Example: exit | ||
|| Example: exit | ||
|| =================================================== | ||
|| Enter command: || [Command entered: delete 1] | ||
|| The person index provided is invalid | ||
|
@@ -49,26 +49,26 @@ | |
|| Enter command: || [Command entered: add wrong args wrong args] | ||
|| Invalid command format! | ||
|| add: Adds a person to the address book. Contact details can be marked private by prepending 'p' to the prefix. | ||
|| Parameters: NAME [p]p/PHONE [p]e/EMAIL [p]a/ADDRESS [t/TAG]... | ||
|| Example: add John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney | ||
|| Parameters: NAME [p]p/PHONE [p]e/EMAIL [p]a/ADDRESS [t/TAG]... | ||
|| Example: add John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney | ||
|| =================================================== | ||
|| Enter command: || [Command entered: add Valid Name 12345 e/[email protected] a/valid, address] | ||
|| Invalid command format! | ||
|| add: Adds a person to the address book. Contact details can be marked private by prepending 'p' to the prefix. | ||
|| Parameters: NAME [p]p/PHONE [p]e/EMAIL [p]a/ADDRESS [t/TAG]... | ||
|| Example: add John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney | ||
|| Parameters: NAME [p]p/PHONE [p]e/EMAIL [p]a/ADDRESS [t/TAG]... | ||
|| Example: add John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney | ||
|| =================================================== | ||
|| Enter command: || [Command entered: add Valid Name p/12345 [email protected] a/valid, address] | ||
|| Invalid command format! | ||
|| add: Adds a person to the address book. Contact details can be marked private by prepending 'p' to the prefix. | ||
|| Parameters: NAME [p]p/PHONE [p]e/EMAIL [p]a/ADDRESS [t/TAG]... | ||
|| Example: add John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney | ||
|| Parameters: NAME [p]p/PHONE [p]e/EMAIL [p]a/ADDRESS [t/TAG]... | ||
|| Example: add John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney | ||
|| =================================================== | ||
|| Enter command: || [Command entered: add Valid Name p/12345 e/[email protected] valid, address] | ||
|| Invalid command format! | ||
|| add: Adds a person to the address book. Contact details can be marked private by prepending 'p' to the prefix. | ||
|| Parameters: NAME [p]p/PHONE [p]e/EMAIL [p]a/ADDRESS [t/TAG]... | ||
|| Example: add John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney | ||
|| Parameters: NAME [p]p/PHONE [p]e/EMAIL [p]a/ADDRESS [t/TAG]... | ||
|| Example: add John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney | ||
|| =================================================== | ||
|| Enter command: || [Command entered: add Valid Name p/12345 e/[email protected] a/valid, address t/goodTag noPrefixTag] | ||
|| Tags names should be alphanumeric | ||
|
@@ -141,14 +141,14 @@ | |
|| Enter command: || [Command entered: view] | ||
|| Invalid command format! | ||
|| view: Views the non-private details of the person identified by the index number in the last shown person listing. | ||
|| Parameters: INDEX | ||
|| Example: view 1 | ||
|| Parameters: INDEX | ||
|| Example: view 1 | ||
|| =================================================== | ||
|| Enter command: || [Command entered: viewall] | ||
|| Invalid command format! | ||
|| viewall: Views the non-private details of the person identified by the index number in the last shown person listing. | ||
|| Parameters: INDEX | ||
|| Example: viewall 1 | ||
|| Parameters: INDEX | ||
|| Example: viewall 1 | ||
|| =================================================== | ||
|| Enter command: || [Command entered: view should be only one number] | ||
|| The person index provided is invalid | ||
|
@@ -201,8 +201,8 @@ | |
|| Enter command: || [Command entered: find] | ||
|| Invalid command format! | ||
|| find: Finds all persons whose names contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers. | ||
|| Parameters: KEYWORD [MORE_KEYWORDS]... | ||
|| Example: find alice bob charlie | ||
|| Parameters: KEYWORD [MORE_KEYWORDS]... | ||
|| Example: find alice bob charlie | ||
|| =================================================== | ||
|| Enter command: || [Command entered: find bet] | ||
|| | ||
|
@@ -236,8 +236,8 @@ | |
|| Enter command: || [Command entered: delete] | ||
|| Invalid command format! | ||
|| delete: Deletes the person identified by the index number used in the last person listing. | ||
|| Parameters: INDEX | ||
|| Example: delete 1 | ||
|| Parameters: INDEX | ||
|| Example: delete 1 | ||
|| =================================================== | ||
|| Enter command: || [Command entered: delete should be only one number] | ||
|| The person index provided is invalid | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is a (intended?) bug actually. Good job spotting it!