This commit is contained in:
Daniel Bauer
2019-11-26 10:38:41 +01:00
parent 44395e7dfd
commit 5397970ed7
2 changed files with 4 additions and 19 deletions

View File

@@ -1,18 +0,0 @@
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
}

View File

@@ -9,7 +9,6 @@ if [ -f "$HOME/.environment.local" ]; then
source $HOME/.environment.local source $HOME/.environment.local
fi fi
source $HOME/.aliases source $HOME/.aliases
source $HOME/.functions
# config specific to this machine # config specific to this machine
if [ -f $HOME/.zshrc_local ]; then if [ -f $HOME/.zshrc_local ]; then
source $HOME/.zshrc_local source $HOME/.zshrc_local
@@ -41,3 +40,7 @@ fi
unset __conda_setup unset __conda_setup
# <<< conda initialize <<< # <<< conda initialize <<<
# snakemake autocomplete
if hash snakemake 2>/dev/null; then
compdef _gnu_generic snakemake
fi