Skip to content

Instantly share code, notes, and snippets.

@jfgomez86
Created July 11, 2011 20:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfgomez86/1076688 to your computer and use it in GitHub Desktop.
Save jfgomez86/1076688 to your computer and use it in GitHub Desktop.
My .zshrc customizations
###
# Shortcut to projects directory: you can replace 'p' with your favorite word/character.
# Autocompleter enabled! Try: `p <tab>` ;)
#
PROJECTS_DIR="/Users/jfgomez86/Projects"
p() {
PROJECT_NAME="$1";
cd "$PROJECTS_DIR/$PROJECT_NAME";
}
_projects_list() {
reply=($(ls $PROJECTS_DIR))
}
compctl -K _projects_list p
###
# Autocompletes apps after typing --app on the command line
#
_heroku_apps() {
reply=($(heroku list | awk {'print $1'}))
}
compctl -x 's[--app],c[-1,--app]' -K _heroku_apps -- heroku
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment