Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
95220004
Commit
95220004
authored
6 years ago
by
RoToRx88
Committed by
Marc Cornellà
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Better support for branch name
Enable to get issue from branch prefixed with it and delimited by '_'
parent
2f6d79b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/jira/jira.plugin.zsh
+6
-1
plugins/jira/jira.plugin.zsh
with
6 additions
and
1 deletion
+6
-1
plugins/jira/jira.plugin.zsh
View file @
95220004
...
...
@@ -65,7 +65,12 @@ function jira() {
# but `branch` is a special case that will parse the current git branch
if
[[
"
$action
"
==
"branch"
]]
;
then
local
issue_arg
=
$(
git rev-parse
--abbrev-ref
HEAD
)
local
issue
=
"
${
jira_prefix
}${
issue_arg
}
"
issue_arg
=(
$(
echo
$issue_arg
|
cut
-d
'_'
-f1
)
)
if
[[
$(
echo
${
issue_arg
}
|
grep
${
jira_prefix
}
)
]]
;
then
local
issue
=
"
${
issue_arg
}
"
else
local
issue
=
"
${
jira_prefix
}${
issue_arg
}
"
fi
else
local
issue_arg
=
${
(U)action
}
local
issue
=
"
${
jira_prefix
}${
issue_arg
}
"
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help