Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
ddit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack MacLauchlan CS2015
ddit
Commits
038ecb88
Commit
038ecb88
authored
6 years ago
by
Jack Maclauchlan
Browse files
Options
Downloads
Patches
Plain Diff
extended cli
parent
a9d28798
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
commands.txt
+1
-0
1 addition, 0 deletions
commands.txt
src/main/java/cli/CommandLineInterface.java
+13
-2
13 additions, 2 deletions
src/main/java/cli/CommandLineInterface.java
src/main/java/command/CommandSelector.java
+1
-1
1 addition, 1 deletion
src/main/java/command/CommandSelector.java
with
15 additions
and
3 deletions
commands.txt
+
1
−
0
View file @
038ecb88
...
...
@@ -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
This diff is collapsed.
Click to expand it.
src/main/java/cli/CommandLineInterface.java
+
13
−
2
View file @
038ecb88
...
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/command/CommandSelector.java
+
1
−
1
View file @
038ecb88
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment