how do I concatenate a regex in a bash alias?
- by Rodreegez
Hello,
I can't for the life of me how to create an alias that will switch to a given project directory.
I keep all my projects in a folder called Projects i.e. ~/Project/blog ~/Project/whatever
I'd like to have an alias along the lines of p whatever that would equate to cd ~/Project/$1 where $1 is whatever is given to p.
I have tried various combinations of alias p="cd ~/Projects/\$1" with all the usual suspects for regex escaping but I can't quite get it.
Any ideas?