rosbash: tab complete on msg type for rostopic list and find

This commit is contained in:
Ken Conley 2009-12-21 19:23:53 +00:00
parent a5d76d438a
commit 57d2b29d43
1 changed files with 11 additions and 1 deletions

View File

@ -411,10 +411,20 @@ function _roscomplete_rostopic {
COMPREPLY=($(compgen -W "$opts" -- ${arg}))
;;
find)
# Need a clever way to do message searching
opts=`_msg_opts ${COMP_WORDS[$COMP_CWORD]}`
COMPREPLY=($(compgen -W "$opts" -- ${arg}))
;;
pub)
# This takes more logic.
opts=`rostopic list`
COMPREPLY=($(compgen -W "$opts" -- ${arg}))
;;
esac
elif [[ $COMP_CWORD == 3 ]]; then
case ${COMP_WORDS[1]} in
pub)
opts=`_msg_opts ${COMP_WORDS[$COMP_CWORD]}`
COMPREPLY=($(compgen -W "$opts" -- ${arg}))
;;
esac
fi