Skip to content

Instantly share code, notes, and snippets.

@cjse
Created January 28, 2009 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjse/53878 to your computer and use it in GitHub Desktop.
Save cjse/53878 to your computer and use it in GitHub Desktop.
export PROJDIR="$HOME/Projects"
p() {
cd $PROJDIR/$1/
}
_projectcomplete() {
COMPREPLY=($(compgen -W '$(`which ls` $PROJDIR/)' -- ${COMP_WORDS[COMP_CWORD]}))
return 0
}
complete -o default -o nospace -F _projectcomplete p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment