Created
July 11, 2011 20:14
-
-
Save jfgomez86/1076688 to your computer and use it in GitHub Desktop.
My .zshrc customizations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# 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