0

I'm trying to write a script, and failing pretty miserably

My script looks like this (I wish it could be jira open not jira_open btw):

jira_open () {
  autoload -Uz vcs_info
  precmd () { vcs_info }
  setopt prompt_subst
  open -a "Google Chrome" "jira.corp.asdf.com/browse/$vcs_info_msg_0_"
}

Chrome is trying to open the argument as a file, and it's saying the file doesn't exist

Please help

neaumusic
  • 243

1 Answers1

1

Well, it turns out that the jira domain is actually hosted through http:// since it's over VPN and de-facto secure and only my earlier attempt with https:// wasn't working

I naively assumed the protocol didn't exist, but prefixing with http:// fixed the problem

https://superuser.com/a/422861/347101

this works fine:

jira_open () {
  autoload -Uz vcs_info
  precmd () { vcs_info }
  setopt prompt_subst
  open -a "Google Chrome" "http://jira.corp.asdf.com/browse/$vcs_info_msg_0_"
}
neaumusic
  • 243