blob: 486a3c6394bd9b9f2cb37f5555f52311bbc84fc1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/zsh
#
# This lets you quickly jump into a project directory.
#
# Type:
#
# c <tab>
#
# ...to autocomplete on all of your projects in the directories specified in
# `functions/_c`. Typically I'm using it like:
#
# c holm<tab>/bo<tab>
#
# ...to quickly jump into holman/boom, for example.
#
# This also accounts for how Go structures its projects. For example, it will
# autocomplete both on $PROJECTS, and also assume you want to autocomplete on
# your Go projects in $GOPATH/src.
if [ ! -z "$1" ] && [ -s "$GOPATH/src/github.com/$1" ]; then
cd "$GOPATH/src/github.com/$1"
else
cd "$PROJECTS/$1"
fi
|