snakemake autocompletion

This commit is contained in:
Daniel Bauer
2019-03-25 08:16:45 +01:00
parent b460eb596d
commit 6999216766
2 changed files with 11 additions and 0 deletions

10
profiles/base/.functions Normal file
View File

@@ -0,0 +1,10 @@
sm_autocomplete() {
# make zsh emulate bash if necessary
if [[ -n "$ZSH_VERSION" ]]; then
autoload bashcompinit
bashcompinit
fi
snakemake_options=$(snakemake --snakefile Snakefile --list)
complete -W "${snakemake_options}" 'snakemake'
}