mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
Fix the argparse tests
This commit is contained in:
parent
a379e9ffeb
commit
43e3d3bcf2
1 changed files with 3 additions and 1 deletions
|
@ -135,7 +135,9 @@ wcstring expand_escape_variable(const env_var_t &var) {
|
|||
const wcstring &el = lst.at(j);
|
||||
if (j) buff.append(L" ");
|
||||
|
||||
if (is_quotable(el)) {
|
||||
// We want to use quotes if we have more than one string, or the string contains a space.
|
||||
bool prefer_quotes = lst.size() > 1 || el.find(L' ') != wcstring::npos;
|
||||
if (prefer_quotes && is_quotable(el)) {
|
||||
buff.append(L"'");
|
||||
buff.append(el);
|
||||
buff.append(L"'");
|
||||
|
|
Loading…
Reference in a new issue