mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
Don't hardcode enum numbers
"1" in the context of `escape_string(..., 1)` is referring to `ESCAPE_ALL`, so we should use that.
This commit is contained in:
parent
711260593c
commit
d0bd238657
1 changed files with 2 additions and 2 deletions
|
@ -593,7 +593,7 @@ void completer_t::complete_cmd_desc(const wcstring &str) {
|
|||
}
|
||||
|
||||
wcstring lookup_cmd(L"__fish_describe_command ");
|
||||
lookup_cmd.append(escape_string(cmd, 1));
|
||||
lookup_cmd.append(escape_string(cmd, ESCAPE_ALL));
|
||||
|
||||
// First locate a list of possible descriptions using a single call to apropos or a direct
|
||||
// search if we know the location of the whatis database. This can take some time on slower
|
||||
|
@ -1603,7 +1603,7 @@ void complete(const wcstring &cmd_with_subcmds, std::vector<completion_t> *out_c
|
|||
static void append_switch(wcstring &out, const wcstring &opt, const wcstring &argument) {
|
||||
if (argument.empty()) return;
|
||||
|
||||
wcstring esc = escape_string(argument, 1);
|
||||
wcstring esc = escape_string(argument, ESCAPE_ALL);
|
||||
append_format(out, L" --%ls %ls", opt.c_str(), esc.c_str());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue