Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
dc42e8d4
Commit
dc42e8d4
authored
Aug 18, 2015
by
Andrew Janke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jira: add completion
parent
7cf892ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
_jira
plugins/jira/_jira
+21
-0
jira.plugin.zsh
plugins/jira/jira.plugin.zsh
+4
-4
No files found.
plugins/jira/_jira
0 → 100644
View file @
dc42e8d4
#compdef jira
#autoload
local -a _1st_arguments
_1st_arguments=(
'new:create a new issue'
'dashboard:open the dashboard'
'reported:search for issues reported by a user'
'assigned:search for issues assigned to a user'
)
_arguments -C \
':command:->command' \
'*::options:->options'
case $state in
(command)
_describe -t commands "jira subcommand" _1st_arguments
return
;;
esac
plugins/jira/jira.plugin.zsh
View file @
dc42e8d4
...
...
@@ -40,7 +40,7 @@ function jira() {
elif
[[
-n
"
${
JIRA_URL
}
"
]]
;
then
jira_url
=
${
JIRA_URL
}
else
jira_url_help
_
jira_url_help
return
1
fi
...
...
@@ -59,7 +59,7 @@ function jira() {
echo
"Opening new issue"
open_command
"
${
jira_url
}
/secure/CreateIssue!default.jspa"
elif
[[
"
$action
"
==
"assigned"
||
"
$action
"
==
"reported"
]]
;
then
jira_query
$@
_
jira_query
$@
elif
[[
"
$action
"
==
"dashboard"
]]
;
then
echo
"Opening dashboard"
open_command
"
${
jira_url
}
/secure/Dashboard.jspa"
...
...
@@ -82,7 +82,7 @@ function jira() {
fi
}
function
jira_url_help
()
{
function
_
jira_url_help
()
{
cat
<<
EOF
JIRA url is not specified anywhere.
Valid options, in order of precedence:
...
...
@@ -92,7 +92,7 @@ Valid options, in order of precedence:
EOF
}
function
jira_query
()
{
function
_
jira_query
()
{
local
verb
=
"
$1
"
local
jira_name lookup preposition query
if
[[
"
${
verb
}
"
==
"reported"
]]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment