Skip to content

Instantly share code, notes, and snippets.

@benshimmin
Created February 28, 2013 17:30
Show Gist options
  • Save benshimmin/5058495 to your computer and use it in GitHub Desktop.
Save benshimmin/5058495 to your computer and use it in GitHub Desktop.
Open JIRA tickets from the commandline!
#!/usr/bin/env bash
#
# Open JIRA tickets from the commandline!
#
# Installation:
#
# $ sudo ln jira.sh /usr/bin/jira
if [ -z $1 ]
then
printf "Missing argument: ticket number\n"
printf "Usage:\njira ticket\n"
exit 1
fi
HOST_NAME="https://jira.<YOUR JIRA HOSTNAME HERE>/browse/"
PROJ_NAME="<YOUR JIRA PROJECT'S PREFIX HERE>"
case "$OSTYPE" in
darwin*)
CMD=open
;;
linux*)
CMD=xdg-open
;;
esac
$CMD $HOST_NAME$PROJ_NAME"-"$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment