Skip to content
Snippets Groups Projects
Commit 038ecb88 authored by Jack Maclauchlan's avatar Jack Maclauchlan
Browse files

extended cli

parent a9d28798
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ push/pull
git ddit -add "id"
git ddit -push
git ddit -commit "message"
git ddit -am "message"
view
-----
display issues
\ No newline at end of file
......@@ -8,8 +8,19 @@ public class CommandLineInterface {
public CommandLineInterface(){
this.options = new Options();
options.addOption("create", "create an issue");
options.addOption("push", "push issues");
addOptions();
// options.addOption("create", "create an issue");
// options.addOption("push", "push issues");
}
public void addOptions(){
Option createIssue = Option.builder("n")
.longOpt("new")
.argName("title")
.hasArg()
.desc("create new issue with given title")
.build();
options.addOption(createIssue);
}
public CommandLine getInput(String[] userInput) throws ParseException {
......
......@@ -19,7 +19,7 @@ public class CommandSelector {
try {
CommandLine userInput = commandLineInterface.getInput(enteredCommand);
Command command;
if (userInput.hasOption("create")) {
if (userInput.hasOption("n")) {
command = createIssue();
} else if (userInput.hasOption("push")) {
command = pushIssue();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment