From 350a07b0a8525645671a029621cc873b2a8d1957 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 9 Feb 2016 14:16:10 +0100 Subject: Fixed oh-my-zsh --- zsh/functions/c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 zsh/functions/c (limited to 'zsh/functions/c') diff --git a/zsh/functions/c b/zsh/functions/c new file mode 100644 index 0000000..486a3c6 --- /dev/null +++ b/zsh/functions/c @@ -0,0 +1,24 @@ +#!/bin/zsh +# +# This lets you quickly jump into a project directory. +# +# Type: +# +# c +# +# ...to autocomplete on all of your projects in the directories specified in +# `functions/_c`. Typically I'm using it like: +# +# c holm/bo +# +# ...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 -- cgit v1.2.3