1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
# rasmol(1) completion
# put this file in /etc/bash_completion.d/
have rasmol &&
_rasmol()
{
local cur
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-nodisplay -script \
-pdb -mdl -mol2 -xyz -mopac -alchemy \
-charmm -cif' -- $cur ) )
else
_filedir '@(pdb|PDB|mol|MOL|mol2|xyz|XYZ|mop|MOP|mopcrt|MOPCRT|mopint|MOPINT|mopout|MOPOUT|alc|ALC|crd|cor|cif|CIF|mmcif|mmCIF|MMCIF)'
fi
}
[ "${have:-}" ] && complete -F _rasmol $filenames rasmol
|