mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 13:50:09 +00:00
Allow jira default action file based setting (#6367)
This commit is contained in:
parent
1e027509d8
commit
6d5b1f1e3b
1 changed files with 10 additions and 4 deletions
|
@ -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 a new issue