send text in separate chunks to work around readline bug