Hi, I've just discovered that it was possible to a...
# tools
l
Hi, I've just discovered that it was possible to activate autocompletion for nf-core tools command with:
eval "$(_NF_CORE_COMPLETE=bash_source nf-core)"
I've also tried to add autocompletion for modules and this seems to works fine.
Copy code
(env_nftools) llenezet@DESKTOP-207MCR6:~/repositories/tools$ nf-core modules install bcftools/
bcftools/stats             bcftools/split             bcftools/call              bcftools/query             bcftools/reheader          
bcftools/convert           bcftools/mpileup           bcftools/pluginimputeinfo  bcftools/sort              bcftools/index             
bcftools/pluginsetgt       bcftools/norm              bcftools/roh               bcftools/concat            bcftools/consensus         
bcftools/annotate          bcftools/plugintag2tag     bcftools/view              bcftools/pluginfilltags    bcftools/pluginsplit       
bcftools/isec              bcftools/csq               bcftools/pluginscatter     bcftools/merge             bcftools/filter
Should I create a PR with modules / subworkflows and pipeline autocompletion ?
🤩 2
đź’Ą 4
m
what do you mean with modules and pipeline autocompletion? they are already there, no?
l
The aims is to make available the modules names for autocompletion. If you type
nf-core modules install bcftools/{TAB}
then it will propose you all the bcftools process available in nf-core.
m
you already get that if you hit enter after install. I don’t think you can do that with module names, because you would first need to load the modules cache
l
Yeah but the aim was to have it directly on the common line while typing. It's just a matter of using the ModulesList() function already available and add it to the rich click shell completion argument.
m
you are welcome to give it a try 🙂
l
Here is the PR for autocompletion. I'm just not sure about the behaviour regarding local and remote modules / subworkflow. https://github.com/nf-core/tools/pull/3660