Revert "Escape separators (colon and equals) to improve completion"

This reverts commit f7dac82ed6 from pull
request #6059.

As discussed in #6099, this caused a regression in some completions (eg
dd).
This commit is contained in:
David Adam
2019-09-19 14:32:40 +08:00
parent b7dd060dec
commit 3ae12ac4d3
6 changed files with 13 additions and 24 deletions

View File

@@ -488,6 +488,7 @@ class reader_data_t : public std::enable_shared_from_this<reader_data_t> {
static volatile sig_atomic_t interrupted = 0;
// Prototypes for a bunch of functions defined later on.
static bool is_backslashed(const wcstring &str, size_t pos);
static wchar_t unescaped_quote(const wcstring &str, size_t pos);
/// Mode on startup, which we restore on exit.
@@ -2298,7 +2299,9 @@ static int can_read(int fd) {
return select(fd + 1, &fds, 0, 0, &can_read_timeout) == 1;
}
bool is_backslashed(const wcstring &str, size_t pos) {
/// Test if the specified character in the specified string is backslashed. pos may be at the end of
/// the string, which indicates if there is a trailing backslash.
static bool is_backslashed(const wcstring &str, size_t pos) {
// note pos == str.size() is OK.
if (pos > str.size()) return false;