Commit 6d5b1f1e authored by Jarryd Tilbrook's avatar Jarryd Tilbrook Committed by Robby Russell
Browse files

Allow jira default action file based setting (#6367)

parent 1e027509
......@@ -2,13 +2,19 @@
#
# See README.md for details
: ${JIRA_DEFAULT_ACTION:=new}
function jira() {
emulate -L zsh
local action=${1:=$JIRA_DEFAULT_ACTION}
local action jira_url jira_prefix
if [[ -f .jira-default-action ]]; then
action=$(cat .jira-default-action)
elif [[ -f ~/.jira-default-action ]]; then
action=$(cat ~/.jira-default-action)
elif [[ -n "${JIRA_DEFAULT_ACTION}" ]]; then
action=${JIRA_DEFAULT_ACTION}
else
action="new"
fi
local jira_url jira_prefix
if [[ -f .jira-url ]]; then
jira_url=$(cat .jira-url)
elif [[ -f ~/.jira-url ]]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment