mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-27 15:30:15 +08:00
Allow jira default action file based setting (#6367)
This commit is contained in:
parent
1e027509d8
commit
6d5b1f1e3b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user