Merge pull request #3 from bioinfornatics/master

Bash autocompletion improvements.
This commit is contained in:
David Nadlinger
2011-08-12 02:40:57 -07:00

View File

@@ -25,11 +25,14 @@ _ldc()
-regalloc -rel -rewriter -run= -shrink-wrap -singleobj -soft-float -spiller -st \
-stack-protector-buffer-size= -stats -tailcallopt -time-passes -unittest -unwind-tables -v \
"
if [[ ${opts_with_path} =~ ${prev} ]] ; then
COMPREPLY=( $(compgen -f ${cur}) )
if [[ "${opts_with_path}" = *"${prev}${cur}"* ]]; then
COMPREPLY=( $(compgen -f ./ ) )
return 0
elif [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
elif [[ "${opts_with_path}" = *"${prev}"* ]]; then
COMPREPLY=( $(compgen -f "${cur}") )
return 0
elif [[ "${cur}" == -* ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
}