diff options
author | Peter Tillemans <pti@snamellit.com> | 2012-10-12 09:34:21 +0200 |
---|---|---|
committer | Peter Tillemans <pti@snamellit.com> | 2012-10-12 09:34:21 +0200 |
commit | 55cc936d4e6d88f18518cedc9574b1df10702f8b (patch) | |
tree | d3af641456bc60a7cc8ddcc0d36541c5d0f374f7 /plugins/jira/jira.plugin.zsh | |
parent | ef96b6c16e1e59c449ef31d658d3232135a3e482 (diff) | |
parent | c2ae9e09ca1f33ff1e13e629a0b2e6bdd19f83a9 (diff) | |
download | zsh-55cc936d4e6d88f18518cedc9574b1df10702f8b.tar.gz zsh-55cc936d4e6d88f18518cedc9574b1df10702f8b.tar.bz2 zsh-55cc936d4e6d88f18518cedc9574b1df10702f8b.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/jira/jira.plugin.zsh')
-rw-r--r-- | plugins/jira/jira.plugin.zsh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh new file mode 100644 index 000000000..636e4619e --- /dev/null +++ b/plugins/jira/jira.plugin.zsh @@ -0,0 +1,22 @@ +# To use: add a .jira-url file in the base of your project +# Setup: cd to/my/project +# echo "https://name.jira.com" >> .jira-url +# Usage: jira # opens a new issue +# jira ABC-123 # Opens an existing issue +open_jira_issue () { + if [ ! -f .jira-url ]; then + echo "There is no .jira-url file in the current directory..." + return 0; + else + jira_url=$(cat .jira-url); + if [ -z "$1" ]; then + echo "Opening new issue"; + `open $jira_url/secure/CreateIssue!default.jspa`; + else + echo "Opening issue #$1"; + `open $jira_url/issues/$1`; + fi + fi +} + +alias jira='open_jira_issue' |