Fix completion script to take into account non-positional arguments

This commit is contained in:
mdiluzio 2015-01-10 17:06:23 +00:00
parent 96153f8c60
commit 3bb5766061

View file

@ -5,12 +5,11 @@ test ! -z TTRTS_MAPS && TTRTS_MAPS=/usr/share/ttrts/maps/
have ttrts &&
function _ttrts
{
commandnames="--server --client --map --host localhost "
commandnames="--server --client --host= --host=localhost "
for filename in ${TTRTS_MAPS}/*
do
map="${filename##*/}"
commandnames+="--map=$map "
commandnames+="$map "
done
local cur prev