Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
95220004
Commit
95220004
authored
Jun 26, 2018
by
RoToRx88
Committed by
Marc Cornellà
Mar 02, 2020
Browse files
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
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
}
"
...
...
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