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 && have ttrts &&
function _ttrts function _ttrts
{ {
commandnames="--server --client --map --host localhost " commandnames="--server --client --host= --host=localhost "
for filename in ${TTRTS_MAPS}/* for filename in ${TTRTS_MAPS}/*
do do
map="${filename##*/}" map="${filename##*/}"
commandnames+="--map=$map " commandnames+="--map=$map "
commandnames+="$map "
done done
local cur prev local cur prev