Обновление ohmyzsh

This commit is contained in:
2021-06-10 11:49:35 +05:00
parent 9fcc978a55
commit e7247fa93a
501 changed files with 18233 additions and 8842 deletions

View File

@@ -54,6 +54,9 @@ function jira() {
else
open_command "${jira_url}/secure/Dashboard.jspa"
fi
elif [[ "$action" == "tempo" ]]; then
echo "Opening tempo"
open_command "${jira_url}/secure/Tempo.jspa"
elif [[ "$action" == "dumpconfig" ]]; then
echo "JIRA_URL=$jira_url"
echo "JIRA_PREFIX=$jira_prefix"
@@ -63,25 +66,33 @@ function jira() {
else
# Anything that doesn't match a special action is considered an issue name
# but `branch` is a special case that will parse the current git branch
local issue_arg issue
if [[ "$action" == "branch" ]]; then
local issue_arg=$(git rev-parse --abbrev-ref HEAD)
local issue="${jira_prefix}${issue_arg}"
# Get name of the branch
issue_arg=$(git rev-parse --abbrev-ref HEAD)
# Strip prefixes like feature/ or bugfix/
issue_arg=${issue_arg##*/}
# Strip suffixes starting with _
issue_arg=(${(s:_:)issue_arg})
issue_arg=${issue_arg[1]}
if [[ "$issue_arg" = ${jira_prefix}* ]]; then
issue="${issue_arg}"
else
issue="${jira_prefix}${issue_arg}"
fi
else
local issue_arg=$action
local issue="${jira_prefix}${issue_arg}"
issue_arg=${(U)action}
issue="${jira_prefix}${issue_arg}"
fi
local url_fragment=''
local url_fragment
if [[ "$2" == "m" ]]; then
url_fragment="#add-comment"
echo "Add comment to issue #$issue"
else
echo "Opening issue #$issue"
fi
if [[ "$JIRA_RAPID_BOARD" == "true" ]]; then
open_command "${jira_url}/issues/${issue}${url_fragment}"
else
open_command "${jira_url}/browse/${issue}${url_fragment}"
fi
open_command "${jira_url}/browse/${issue}${url_fragment}"
fi
}