I have a program that is a wrapper around
ssh. It's officially
employer-ssh, and running
employer-ssh git looks up the
monkey in a table to find the real hostname,
monkey-01.deployed-uswest.employer-ec2.com and then runs
monkey-01.deployed-uswest.employer-ec2.com. There are some other
features attached to it also. For example, it makes sure that the VPN
is connected before it tries to run
I never actually invoke it as
employer-ssh monkey, though. Instead,
I just run
monkey, which is a symlink to
program sees that no argument has been supplied, and infers that
monkey is the alias I wanted to use.
It sometimes happens that I need that long hostname in some other
context though, and for quite a while the way I would look it up would
be to grep the source code of the program:
% grep monkey $(which monkey)
monkey ) host=monkey-01.deployed-uswest.employer-ec2.com
This had been bugging me for a while, and I had the idea of giving the
program a flag so that instead of running
ssh it would just print
out the full hostname. After several months, I finally got around to
putting in that feature.
Or I tried to. I found it had been there all along:
% monkey what
This mode also makes it skip the part where it deals with the VPN.
I don't know what to conclude from this.