go -- quick directory switching

Home http://trentm.com/projects/go/
License MIT (more details at OSI)
Platforms Windows, Linux, Mac OS X, Unix
Current Version 1.0.6 What's new?
Dev Status mature
Requirements Python >= 2.2

What's new?

I have moved hosting of go.py from my old Starship pages to this site. These starter docs have been improved a little bit. See the Change Log below for more.

Why go?

go is a small command for changing directories quickly. Typically you have a set of directories that you work in. Typing out the names of those dirs in full can be tedious. go allows you to give a shortcut name for a directory, say ko for D:\trentm\main\Apps\Komodo-devel, and do the following:

C:\> go ko
D:\trentm\main\Apps\Komodo-devel>

and

C:\> go ko/test
D:\trentm\main\Apps\Komodo-devel\test>

Think of it as a super cd.

On Windows, go also integrates with the Dave's Quick Search Deskbar, and excellent tool itself. As well, the -o allows you to open your named shortcut in Explorer.

go is free (MIT License). Please send any feedback to Trent Mick.

Install Notes

Download the latest (1) go source package, (2) unzip it, and (3) run python setup.py install in the unzipped directory:

unzip go-1.0.6.zip
cd go-1.0.6
python setup.py install

If your install fails then please visit the Troubleshooting FAQ.

For Linux/Mac OS X/Unix uses you need to setup a little function in your shell environment so that 'go' can change your shell's current directory. If you use the Bash shell, put the following in your ~/.bashrc file:

function go {
    go_is_on_path="`\which go`"
    if test -e "$go_is_on_path"; then
        export GO_SHELL_SCRIPT=$HOME/.__tmp_go.sh
        python `\which go` $*
        if [ -f $GO_SHELL_SCRIPT ] ; then
            source $GO_SHELL_SCRIPT
        fi
    else
        echo "ERROR: could not find 'go' on your PATH"
    fi
}

If you use CSH (or TCSH or similar), pester me to add CSH support.

For Windows users that is it for basic installation. If you use Dave's Quick Search Deskbar -- and you should -- the setup.py script should have installed a DQSD go command (i.e., a go.xml file in your DQSD localsearches folder).

Getting Started

The most common things you'll do with go are adding new shortcuts:

[~/Library/Application Support/Komodo]$ go -a koappdata

listing the shortcuts you've created:

[~]$ go --list
                    Go Shortcuts
                    ============

Default shortcuts:
  .                     .
  ..                    ..
  ...                   ../..
  tmp                   /tmp
  ~                     /Users/trentm

Custom shortcuts:
  apy                   /Users/trentm/as/main/Apps/ActivePython-devel
  cgi-bin               /Library/WebServer/CGI-Executables
  ko                    /Users/trentm/as/main/Apps/Komodo-devel
  koappdata             /Users/trentm/Library/Application Support/Komodo
  moz                   /Users/trentm/as/main/Apps/Mozilla-devel
  pyinstall             /Library/Frameworks/Python.framework/Versions/2.4
  pylib                 /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3
  staging               /Users/trentm/Sites/staging
  www                   /Users/trentm/Sites

and switching to directories using those shortcuts:

[~]$ go ko
[~/as/main/Apps/Komodo-devel]$ go koappdata
[~/Library/Application Support/Komodo]$ go moz/support
[~/as/main/Apps/Mozilla-devel/support]$

Run go --help for full usage details or just take a look at the go.py script:

$ go --help
Quick directory changing.

Usage:
    go <shortcut>[/sub/dir/path]    # change directories
                                    # same as "go -c ..."
    go -c|-o|-a|-d|-s ...           # cd to, open, add, delete, set
    go --list [<pattern>]           # list matching shortcuts

Options:
    -h, --help                      print this help and exit
    -V, --version                   print verion info and exit

    -c, --cd <path>                 cd to shortcut path in shell
    -s, --set <shortcut> <dir>      set a shortcut to <dir>
    -a, --add-current <shortcut>    add shortcut to current directory
    -d, --delete <shortcut>         delete the named shortcut
    -o, --open <path>               open the given shortcut path in
                                    explorer (Windows only)
    -l, --list [<pattern>]          list current shortcuts

Generally you have a set of directories that you commonly visit.
Typing these paths in full can be a pain. This script allows one to
define a set of directory shortcuts to be able to quickly change to
them. For example, I could define 'ko' to represent
"D:\trentm\main\Apps\Komodo-devel", then
    C:\> go ko
    D:\trentm\main\Apps\Komodo-devel>
and
    C:\> go ko/test
    D:\trentm\main\Apps\Komodo-devel\test>

As well, you can always use some standard shortcuts, such as '~'
(home) and '...' (up two dirs).

See <http://trentm.com/projects/go/> for more information.

Change Log

v1.0.6

v1.0.5

v1.0.4

v1.0.3

v1.0.2

v1.0.1

v1.0.0

v0.9.2:

v0.9.1:

v0.9.0:

v0.8.2:

v0.8.1:

v0.8.0:

v0.7.0:

v0.6.3: