<div dir="ltr">Also note that the FQDN should include the project name as well (this is not being currently enforced, though), so I'd amend the script with:<div><br></div><div>labs() {</div><div>  host=$1</div><div>  proj=$2</div><div>  shift 2</div><div>  [[ -z "$proj" ]] && proj="<insert_your_default_project_here>"</div><div>  ssh "${host}.${proj}.eiad.wmflabs" "$@"</div><div>}</div><div><br></div><div><br></div><div>Marko</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 March 2016 at 23:42, Platonides <span dir="ltr"><<a href="mailto:platonides@gmail.com" target="_blank">platonides@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Aaron Halfaker wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hey folks,<br>
<br>
I have spent a little time today working out a cute little bash alias<br>
trick for reducing my typing when connecting to various instances in<br></span>
labs.  Adding the following code to your /.bash_alias/ (or just<br>
/.bashrc/) file will change $ ssh <your instance>.eqiad.wmflabs to $<span class=""><br>
labs <your instance>.<br>
<br>
<br>
    labs_ssh() {<br>
       ssh $1.eqiad.wmflabs<br>
    }<br>
    alias labs=labs_ssh<br>
<br>
<br>
And there you have it.  It's not much, but this helped my sanity a<br>
little bit and I wanted to share.<br>
</span></blockquote>
<br>
Note that if you name the function labs, you won't need the alias. And you probably want to keep the ability to provide parameters to ssh, so:<br>
<br>
labs() {<br>
  hostname="$1.eqiad.wmflabs"<br>
  shift<br>
  ssh "$hostname" "$@"<div class="HOEnZb"><div class="h5"><br>
}<br>
<br>
_______________________________________________<br>
Labs-l mailing list<br>
<a href="mailto:Labs-l@lists.wikimedia.org" target="_blank">Labs-l@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/labs-l" rel="noreferrer" target="_blank">https://lists.wikimedia.org/mailman/listinfo/labs-l</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Marko Obrovac, PhD<div>Senior Services Engineer</div><div>Wikimedia Foundation</div></div></div></div></div></div></div>
</div>