Remove EXPAND_SKIP_PROCESS, which did not actually work

This commit is contained in:
ridiculousfish 2014-10-15 12:42:55 -07:00
parent ff7108877b
commit 049bd227ed
2 changed files with 6 additions and 16 deletions

View File

@ -1843,7 +1843,6 @@ int expand_string(const wcstring &input, std::vector<completion_t> &output, expa
if (!(EXPAND_SKIP_HOME_DIRECTORIES & flags)) if (!(EXPAND_SKIP_HOME_DIRECTORIES & flags))
expand_home_directory(next); expand_home_directory(next);
if (flags & ACCEPT_INCOMPLETE) if (flags & ACCEPT_INCOMPLETE)
{ {
if (! next.empty() && next.at(0) == PROCESS_EXPAND) if (! next.empty() && next.at(0) == PROCESS_EXPAND)
@ -1853,10 +1852,7 @@ int expand_string(const wcstring &input, std::vector<completion_t> &output, expa
interested in other completions, so we interested in other completions, so we
short-circuit and return short-circuit and return
*/ */
if (!(flags & EXPAND_SKIP_PROCESS))
{
expand_pid(next, flags, output, NULL); expand_pid(next, flags, output, NULL);
}
return EXPAND_OK; return EXPAND_OK;
} }
else else
@ -1864,14 +1860,11 @@ int expand_string(const wcstring &input, std::vector<completion_t> &output, expa
append_completion(*out, next); append_completion(*out, next);
} }
} }
else else if (! expand_pid(next, flags, *out, errors))
{
if (!(flags & EXPAND_SKIP_PROCESS) && ! expand_pid(next, flags, *out, errors))
{ {
return EXPAND_ERROR; return EXPAND_ERROR;
} }
} }
}
in->clear(); in->clear();
std::swap(in, out); // note: this swaps the pointers only (last output is next input) std::swap(in, out); // note: this swaps the pointers only (last output is next input)

View File

@ -50,17 +50,14 @@ enum
/** Don't generate descriptions */ /** Don't generate descriptions */
EXPAND_NO_DESCRIPTIONS = 1 << 6, EXPAND_NO_DESCRIPTIONS = 1 << 6,
/** Don't do process expansion */
EXPAND_SKIP_PROCESS = 1 << 7,
/** Don't expand jobs (but you can still expand processes). This is because job expansion is not thread safe. */ /** Don't expand jobs (but you can still expand processes). This is because job expansion is not thread safe. */
EXPAND_SKIP_JOBS = 1 << 8, EXPAND_SKIP_JOBS = 1 << 7,
/** Don't expand home directories */ /** Don't expand home directories */
EXPAND_SKIP_HOME_DIRECTORIES = 1 << 9, EXPAND_SKIP_HOME_DIRECTORIES = 1 << 8,
/** Allow fuzzy matching */ /** Allow fuzzy matching */
EXPAND_FUZZY_MATCH = 1 << 10 EXPAND_FUZZY_MATCH = 1 << 9
}; };
typedef int expand_flags_t; typedef int expand_flags_t;