diff options
author | yleo77 <ylep77@gmail.com> | 2013-07-16 16:37:18 +0800 |
---|---|---|
committer | yleo77 <ylep77@gmail.com> | 2013-07-16 16:37:18 +0800 |
commit | 67b2781f6200a0dff35055eb67937a0df2be2c51 (patch) | |
tree | 73b692f4146042966f7d2fed10ab88946cbc077b /plugins/jira | |
parent | 6b832b93588567cb00b9a9e8170a5ebf539dea51 (diff) | |
parent | 7f74294d7aa7ab86e18e70a1153c15fa373c5849 (diff) | |
download | zsh-67b2781f6200a0dff35055eb67937a0df2be2c51.tar.gz zsh-67b2781f6200a0dff35055eb67937a0df2be2c51.tar.bz2 zsh-67b2781f6200a0dff35055eb67937a0df2be2c51.zip |
Merge remote-tracking branch 'robbyrussell/master'
Diffstat (limited to 'plugins/jira')
-rw-r--r-- | plugins/jira/jira.plugin.zsh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index b91f93c95..9aa192c1e 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -3,7 +3,7 @@ # .jira-url in the current directory takes precedence # # If you use Rapid Board, set: -#JIRA_RAPID_BOARD="yes" +#JIRA_RAPID_BOARD="true" # in you .zshrc # # Setup: cd to/my/project @@ -11,6 +11,13 @@ # Usage: jira # opens a new issue # jira ABC-123 # Opens an existing issue open_jira_issue () { + local open_cmd + if [[ $(uname -s) == 'Darwin' ]]; then + open_cmd='open' + else + open_cmd='xdg-open' + fi + if [ -f .jira-url ]; then jira_url=$(cat .jira-url) elif [ -f ~/.jira-url ]; then @@ -27,10 +34,10 @@ open_jira_issue () { `open $jira_url/secure/CreateIssue!default.jspa` else echo "Opening issue #$1" - if [[ "x$JIRA_RAPID_BOARD" = "yes" ]]; then - `open $jira_url/issues/$1` + if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then + $open_cmd "$jira_url/issues/$1" else - `open $jira_url/browse/$1` + $open_cmd "$jira_url/browse/$1" fi fi } |