As far as I know, there is no command for that. There is an option "close" appearing in the tools option bar, which connects the open ends of at least three line segments drawn consecutively.But it doesn't make a single entity of them.
With plain lines connecting to each other you can use "create polylines of existing segments". Or draw them as polylines from the onset.
If you have mixed and/or seperated entities you have to make a block of it.
Only "Rectangle" produces a single entity by default.