Closed FelipeGdM closed 2 years ago
@gbiggs I applied the suggested changes and added some fixes for problems that appeared upon further testing
One important addition was the backwards compatibility check to handle .sh
scripts registered as fish env hooks. In terms of codebase maintenance, it may be not be a problem to preserve .sh
scripts in the fish stack (and thus prevent unnecessary code duplication), bass can handle them as long as they don't declare any bash functions.
In this effort, PR https://github.com/ros/ros/pull/301 was created in order to assert consistency among ROS files
The fish shell is an alternative shell to bash or zsh. It defines itself as a
Fish is already kind of supported by catkin with use of the helper bass, as documented in rosbash ROS wiki page. Specific support for it was already discussed in #921
This PR creates the files
setup.fish.in
andlocal_setup.fish.in
to provide native setup scripts for fish users. The main benefit from this update is the possibility to use fish scripts as environment hooks in catkin workspaces.For example, the script rosfish (actual template here) is declared as env hook in the package rosbash
Since
bass source setup.bash
runs a bash-like setup, this fish env hook is not loaded, so the usual sequence of commands to start a fish workspace is (as shown in rosbash docs)With this PR, it becomes a simple
With the bonus that not only
rosfish
is loaded, but also any other fish-specific env hook in the workspace. It is particularly useful to extend packages like ROS Workspace Scripts to fish environments