Hi guys, I want to add a “bash completion script” for my conda-forge package (i.e. when a user types the executable name and then tab, bash will autocomplete the options - see Creating a bash completion script). What do I need to do in the recipe or elsewhere so that this completion script is installed/activated when a user installs the package?
I am not sure if all these steps are necessary, but in GitHub - conda-forge/yarp-feedstock: A conda-smithy repository for yarp. I have a working bash integration with the following sareps:
- I install the
yarp
completion script in<install_prefix>/share/bash-completion/completions
- I added a dependency on bash-completion package yarp-feedstock/meta.yaml at 72597e263838af81e935475dc850e3b0383ee684 · conda-forge/yarp-feedstock · GitHub
- I add
<install_prefix>/share
in XDG_DATA_DIRS yarp-feedstock/activate.msh at 72597e263838af81e935475dc850e3b0383ee684 · conda-forge/yarp-feedstock · GitHub
thanks! this is very helpful
I am not familiar with the activate.msh script - is this a conda thing? do I need to add anything in the recipe to point to it?
That is a multisheller file. Basically, it is there to avoid duplicating the information on which variables to modify in multiple activation/deactivation scripts for each shell supported by conda. To use it, just add multisheller
in the build dependencies, and then add the code to generate the actual activation scripts as in yarp-feedstock/build_cxx.sh at 72597e263838af81e935475dc850e3b0383ee684 · conda-forge/yarp-feedstock · GitHub and in yarp-feedstock/bld_cxx.bat at 72597e263838af81e935475dc850e3b0383ee684 · conda-forge/yarp-feedstock · GitHub . However, you can just append variables as you are used to do, the use of multisheller is not compulsory in this case.