mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Eliminate wildcard_expand function
This commit is contained in:
parent
b92acd3cf2
commit
6347988e0a
1 changed files with 4 additions and 12 deletions
|
@ -1053,17 +1053,6 @@ void wildcard_expander_t::expand(const wcstring &base_dir, const wchar_t *wc)
|
|||
}
|
||||
|
||||
|
||||
static int wildcard_expand(const wchar_t *wc,
|
||||
const wcstring &base_dir,
|
||||
expand_flags_t flags,
|
||||
std::vector<completion_t> *out)
|
||||
{
|
||||
assert(out != NULL);
|
||||
wildcard_expander_t expander(base_dir, wc, flags, out);
|
||||
expander.expand(base_dir, wc);
|
||||
return expander.status_code();
|
||||
}
|
||||
|
||||
int wildcard_expand_string(const wcstring &wc, const wcstring &base_dir, expand_flags_t flags, std::vector<completion_t> *output)
|
||||
{
|
||||
assert(output != NULL);
|
||||
|
@ -1074,5 +1063,8 @@ int wildcard_expand_string(const wcstring &wc, const wcstring &base_dir, expand_
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
return wildcard_expand(wc.c_str(), base_dir, flags, output);
|
||||
|
||||
wildcard_expander_t expander(base_dir, wc.c_str(), flags, output);
|
||||
expander.expand(base_dir, wc.c_str());
|
||||
return expander.status_code();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue