support for rosmsgproto

This commit is contained in:
Ken Conley 2012-02-15 02:20:50 +00:00
parent 0bb4ef9ac2
commit 138ab7b30e
2 changed files with 22 additions and 0 deletions

View File

@ -638,6 +638,9 @@ function _roscomplete_rostopic {
elif [[ $COMP_CWORD == 3 ]]; then elif [[ $COMP_CWORD == 3 ]]; then
opts=`_msg_opts ${COMP_WORDS[$COMP_CWORD]}` opts=`_msg_opts ${COMP_WORDS[$COMP_CWORD]}`
COMPREPLY=($(compgen -W "$opts" -- ${arg})) COMPREPLY=($(compgen -W "$opts" -- ${arg}))
elif [[ $COMP_CWORD == 4 ]]; then
opts=`rosrun rosmsg rosmsgproto msg -s ${COMP_WORDS[3]}`
COMPREPLY="$opts"
fi fi
;; ;;
esac esac
@ -664,6 +667,14 @@ function _roscomplete_rosservice {
COMPREPLY=($(compgen -W "$opts" -- ${arg})) COMPREPLY=($(compgen -W "$opts" -- ${arg}))
;; ;;
esac esac
elif [[ $COMP_CWORD == 3 ]]; then
case ${COMP_WORDS[1]} in
call)
type=`rosservice type ${COMP_WORDS[2]}`
opts=`rosrun rosmsg rosmsgproto srv -s ${type}`
COMPREPLY="$opts"
;;
esac
fi fi
} }

View File

@ -423,6 +423,9 @@ function _roscomplete_rostopic {
elif [[ ${CURRENT} == 4 ]]; then elif [[ ${CURRENT} == 4 ]]; then
opts=`_msg_opts ${=${(s: :)words[-1]}}` opts=`_msg_opts ${=${(s: :)words[-1]}}`
reply=(${=opts}) reply=(${=opts})
elif [[ ${CURRENT} == 5 ]]; then
opts=`rosrun rosmsg rosmsgproto msg -s ${=${(s: :)words[-1]}}`
reply=(${=opts})
fi fi
;; ;;
esac esac
@ -450,6 +453,14 @@ function _roscomplete_rosservice {
reply=(${=opts}) reply=(${=opts})
;; ;;
esac esac
elif [[ ${CURRENT} == 4 ]]; then
case ${=${(s: :)words}[2]} in
call)
type=`rosservice type ${=${(s: :)words[-1]}}`
opts=`rosrun rosmsg rosmsgproto srv -s ${type}`
reply=(${=opts})
;;
esac
fi fi
} }