Overview

-- restructuredtext --

GT (Goto)

First impression

Let's assume you are working on your awesome project "cool-thingy" and you need to do a couple of command line stuff -- e.g. run a bunch of acceptance tests, check the resulting log files in a temporary location and then, if all looks well, commit the latest edits to your project's local mercurial repository

In the above "not so ficticious" scenario, an example workflow could be:

  1. Start the shell from the run menu

    C:Documents and SettingsCooldev>

  2. Change the prompt to your project's directory

    C:Documents and SettingsCooldev> cd /d D:myprojectscool-thingy D:myprojectscool-thingy>

  3. Run the tests

    D:myprojectscool-thingy>runalltests

  4. Change the prompt to your project's log directory

    D:myprojectscool-thingy> cd /d C:Tempcool-thingylogs

  5. Check the logs (all is well)

  6. Change the prompt back to your project's directory

    C:Tempcool-thingylogs> cd /d D:myprojectscool-thingy

  7. Commit all the latest changes

    D:myprojectscool-thingy>hg ci -m "Changed some stuff."

Phew! As contrived as the above example is, it does serve to highlight a serious hurdle to smooth operations within the shell. You have to remember the operations you need to do as well as the locations to do them. You need a better approach. Something that "remembers" the actual locations for you so you can focus on the tasks to perform -- not rediculously long paths.

Meet GT (Goto). With GT, you only need to remember an "alias" to a location, it will take you there. Here is another pain free way to complete our tasks with help from GT. Now our actions are focused on value adding tasks, not mundane actions such as changing from one directory to another.

  1. Start the shell from the run menu

    C:Documents and SettingsCooldev>

  2. Run the tests

    C:Documents and SettingsCooldev> gt cool D:myprojectscool-thingy>runalltests

  3. Check the logs

    D:myprojectscool-thingy> gt cool-logs C:Tempcool-thingylogs>

  4. Commit all the latest changes

    C:Tempcool-thingylogs> gt cool D:myprojectscool-thingy>hg ci -m "Changed some stuff."

Obviously that is a lot simpler -- just focus on the tasks that hold value for you. If like what you see so far, go ahead and read on for more information on GT.

What it is... kind of

GT (Goto) was supposed to be a simple command line tool to help command line users easily switch between the directories they use the most.

...supposed to be...

What it actually turned out to be is a combination of things:

  • a teleportation gateway that zaps you instantly from your current position

to a another with a simple nod of your head * a reference library that "knows" all the your important destinations so you do not have to remember them * a productivity tool that helps you focus on the task at hand rather than mundane concerns such as where to perform those tasks

Yes, GT is a blend of goodness, seemlessly woven into a slender shiny tiny widget that silently slips into your pocket and goes whereever you do.

Okay, okay, so I exaggerated a bit there... well alright! A lot! But seriously, GT is all those things above, only it's limited to your command line.

Requirements

Currently GT works only in Windows (it is after all a batch script). Plans are underway to bring this breath of fresh air to a *nix shell or mac terminal near you.

So to run this script on Windows you need:

  • Windows. At the moment only XP and Vista have been tested.
  • ...

Well that's it! If you have the Windows editions mentioned above, thats all you need. You can now install GT on your system. Wohoo!

Installation

  • Download the "gt.bat" batch file to your pc.
  • Copy the "gt.bat" file to a location (eg: C:envgtgt.bat) on your pc. We'll refer to this directory as GT_INSTALL_PATH.
  • Add the GT_INSTALL_PATH directory to your PATH.
  • You may now start using GT.

Getting started

Start your command line/shell and enter "gt" at the prompt

> gt

That's all you need to get started. GT progressively exposes functionality through the command line, so the command interface will help you discover the commands you need to work effectively with GT.

Basic usage

Here are some of the basic things you can do with GT.

> gt -list