alias to source current workspace
Hi, I am (unfortunately) not a bash expert and would like to create an alias that sources the current workspace, i.e. do the following:
- Situation: I am some where in
~/workspaces/ws1/src/asdf
- I execute an alias
source_curr_ws
- the alias should go levels up until the workspace directory and source
~workspaces/ws1/devel/setup.bash
Of course, the names for workspace
and ws1
should be flexible which is why I don't want to put the absolute path in the .bashrc
. Thx for any pointer!
So this isn't really a ROS question.
While the context is certainly ROS-related, as you already imply yourself, implementing what you describe is mostly a Bash affair.
You may get more / better / quicker responses if you post this on something like Stack Exchange.