20.7.1.4189

```
clickhouse-client -m

:) select 1
:-] ---abbbb
:-] , 2 b
:-] ;

SELECT 1

┌─1─┐
│ 1 │
└───┘
```

19.13.7.57
```
clickhouse-client -m
select 1
:-] --xxxx
:-] ,2 b
:-] ;

SELECT
    1,
    2 AS b

┌─1─┬─b─┐
│ 1 │ 2 │
└───┴───┘
```
#include <common/LineReader.h>
#include <iostream>
#include <string_view>
#include <string.h>
#include <unistd.h>
#ifdef OS_LINUX
#   include <dlfcn.h>
extern "C"
{
    char * readline(const char *) __attribute__((__weak__));
    char * (*readline_ptr)(const char *) = readline;
}
#endif
namespace
{
void trim(String & s)
{
    s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { return !std::isspace(ch); }).base(), s.end());
}
bool hasInputData()
{
    timeval timeout = {0, 0};
    fd_set fds{};
    FD_ZERO(&fds);
    FD_SET(STDIN_FILENO, &fds);
    return select(1, &fds, nullptr, nullptr, &timeout) == 1;
}
}
std::optional<LineReader::Suggest::WordsRange> LineReader::Suggest::getCompletions(const String & prefix, size_t prefix_length) const