Implement new newline-escaping behavior. Backslashes at the end of lines now essentially delete the newline, within normal text or double quotes. Backslashes are retained within single quotes.

Fixes https://github.com/fish-shell/fish-shell/issues/347
Fixes https://github.com/fish-shell/fish-shell/issues/52
This commit is contained in:
ridiculousfish
2012-11-22 01:09:07 -08:00
parent 6fc9e6f21e
commit 90495f3ac5
7 changed files with 56 additions and 40 deletions

View File

@@ -1810,7 +1810,6 @@ void complete(const wcstring &cmd, std::vector<completion_t> &comps, complete_ty
tokenizer_t tok(buff.c_str(), TOK_ACCEPT_UNFINISHED | TOK_SQUASH_ERRORS);
while (tok_has_next(&tok) && !end_loop)
{
switch (tok_last_type(&tok))
{
@@ -1881,7 +1880,6 @@ void complete(const wcstring &cmd, std::vector<completion_t> &comps, complete_ty
end_loop=1;
break;
}
}
if (tok_get_pos(&tok) >= (long)pos)