mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 22:21:15 -03:00
Large cleanup and refactoring of unescape() function.
This commit is contained in:
11
complete.cpp
11
complete.cpp
@@ -1982,13 +1982,10 @@ void complete(const wcstring &cmd, std::vector<completion_t> &comps, completion_
|
||||
{
|
||||
bool do_file = false;
|
||||
|
||||
wcstring current_command_unescape = current_command;
|
||||
wcstring prev_token_unescape = prev_token;
|
||||
wcstring current_token_unescape = current_token;
|
||||
|
||||
if (unescape_string(current_command_unescape, 0) &&
|
||||
unescape_string(prev_token_unescape, 0) &&
|
||||
unescape_string(current_token_unescape, UNESCAPE_INCOMPLETE))
|
||||
wcstring current_command_unescape, prev_token_unescape, current_token_unescape;
|
||||
if (unescape_string(current_command, ¤t_command_unescape, UNESCAPE_DEFAULT) &&
|
||||
unescape_string(prev_token, &prev_token_unescape, UNESCAPE_DEFAULT) &&
|
||||
unescape_string(current_token, ¤t_token_unescape, UNESCAPE_INCOMPLETE))
|
||||
{
|
||||
do_file = completer.complete_param(current_command_unescape,
|
||||
prev_token_unescape,
|
||||
|
||||
Reference in New Issue
Block a user