Introducting: g
jebug29's Gopher Shortcut Tool

This tool is available for download in a zip archive at the software
page on my gopher hole. If you think it would be useful for you, please
try it and let me know what you think.

Heya heya gopher folks. I don't really like posting two phlogs in one
day, but this one is less of a phlog and more of an announcement for the
first piece of software I've written to work on SDF (and I guess
anywhere else really): g.

Previously I had set aliases in my .profile to quickly get to gopher
holes that I often visited (for example, gopherj went to my own gopher
hole, gopher://gopher.club/1/users/jebug29). I started to realize though
that if I wanted to keep this up, I'd either have to type out a really
long command to go to the gopher hole I wanted every time, navigate my
way through the phlogs, or put another alias in my .profile and try to
remember it. I didn't really like any of these options, and figured it
would be fairly easy to just write a two line script that would append
whatever username onto "gopher://gopher.club/1/users/jebug29". So, I
did. It was this:

#!/bin/bash
lynx gopher://gopher.club/1/users/$1

But for me, that wasn't enough. What if I wanted to use UMN Gopher
instead of Lynx? What if I wanted to visit an external Gopher site like
Cat's own baud.baby or Tomasino's gopher.black?

So, I wrote this script. It can be used as follows:
$ g sdf-username [lynx|gopher]
OR
$ g domain.extension/ [lynx|gopher]

So, I can just type "g jebug29" and it will take me to my phlog on SDF.
Or I can type "g jebug29 lynx" and it will do the same using Lynx, and
use lynx every time after that unless I specify Gopher (the default is
Gopher, so if you prefer lynx, just run it with lynx appended first).

If I want to visit Cat's gopher site, I can just type "g baud.baby/" and
it will take me there (the distinguishing pattern being that there is a
and a / somewhere in the string. This creates the issue that users
with .'s in their username or .'s in their subdirectories can't go to a
subdirectory directly using "g". However, they can still access their
gopher root.)

I can also type in something like "g jebug29/software" and it will take
me directly to my software page. This is EXTREMELY useful for someone
setting up a new directory on their gopher and they want to access it
easily without making it public first.

But anyway, yeah! That's pretty much it! I would appreciate any feedback
on g that you have. If you do download it, I recommend making an alias
in your .profile to it so that it can be used easily from the
commandline.

alias g="~/fakepath/g$*"

NOTE: If you want to use this on another system and it doesn't work, you
may want to change the first line of g from
#!/usr/pkg/bin/bash
to
#!/bin/bash

Thanks!