Permalink
Browse files

Silence mmseqs not found errors in shell completion, if mmseqs is not…

… in PATH
  • Loading branch information...
milot-mirdita committed Dec 20, 2018
1 parent fb102af commit 95534e1bd7186dce99feed238e16a8501d4db9eb
Showing with 2 additions and 2 deletions.
  1. +2 −2 util/bash-completion.sh
@@ -5,12 +5,12 @@ _mmseqs() {
cur="${COMP_WORDS[COMP_CWORD]}"

if [[ ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(LC_COLLATE=C compgen -W "$(mmseqs shellcompletion)" -- "${cur}") )
COMPREPLY=( $(LC_COLLATE=C compgen -W "$(mmseqs shellcompletion 2> /dev/null)" -- "${cur}") )
return 0
fi

if [[ ${COMP_CWORD} -gt 1 ]] ; then
COMPREPLY=( $(LC_COLLATE=C compgen -f -W "$(mmseqs shellcompletion "${COMP_WORDS[1]}")" -- "${cur}") )
COMPREPLY=( $(LC_COLLATE=C compgen -f -W "$(mmseqs shellcompletion "${COMP_WORDS[1]}" 2> /dev/null)" -- "${cur}") )
return 0
fi

0 comments on commit 95534e1

Please sign in to comment.