Skip to content

Instantly share code, notes, and snippets.

@manix84
Created October 16, 2012 09:42
Show Gist options
  • Save manix84/3898362 to your computer and use it in GitHub Desktop.
Save manix84/3898362 to your computer and use it in GitHub Desktop.
Find the name of your workplace directory and cd into it.
function cdproj() {
local projectDir=$(ls /workplace | grep $USER | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g")
cd /workplace/${projectDir}/$1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment