The line-based protocol currently used cannot handle this properly, so
introduce this as a stop-gap measure - otherwise messages might be cut
off.
This makes it work for now, and the text is wrapped correctely for the
screen width in the TUI anyway - which is the only user of this so far.
Will be reworked properly later on.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
[ TL: add fix-me comment ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
sub prompt {
my ($self, $query) = @_;
+ $query =~ s/\n/ /g; # FIXME: use a better serialisation (e.g., JSON)
print STDOUT "prompt: $query\n";
my $response = <STDIN> // ''; # FIXME: error handling?