Files
dotfiles/profiles/base/.functions
Daniel Bauer 2b9a3f804c autocommit
2019-04-15 13:22:15 +02:00

18 lines
349 B
Plaintext

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'
}
cd() {
builtin cd "$@"
if [ -f "Snakefile" ]; then
sm_autocomplete
fi
}