I've been using cmake and creating a build folder for my cmake code and I want to easily cd to the build directory. I've been naming my build directory in this format:
/parent/codeandsuch
/parent/codeandsuch_build
I've tried the following alias in my bashrc but its not working. Ive copied the name of the current directory to a string, added _build to it and tried to cd but its not working. Any ideas? Thanks
alias cdbuild='DIR=${PWD##*/} || DIR = DIR + "_build"|| echo DIR || cd ../DIR'