Skip to content

Instantly share code, notes, and snippets.

@pcn
Created August 20, 2013 18:30
Show Gist options
  • Select an option

  • Save pcn/6285327 to your computer and use it in GitHub Desktop.

Select an option

Save pcn/6285327 to your computer and use it in GitHub Desktop.
Proposal for "h": an alternative command for the ssh_helper
function h () {
arg1=pop
case $1 in
p*) the_env=production
;;
s*) the_env=staging
;;
ua*) the_env=uat
;;
u*) the_env=utility
;;
a*) the_env=analytics
;;
tpp*) the_env=testprep-production
;;
tps*) the_env=testprep-staging
;;
rs*) the_env=readiness-staging
;;
rp*) the_env=readiness-production
;;
*)
echo "You haven't entered one of the valid environments. (try 'type h' to look at this function)"
return 2
;;
esac
ssh_helper -e $the_env $*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment