mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 18:03:37 +08:00
Remove EXPAND_SKIP_PROCESS, which did not actually work
This commit is contained in:
parent
ff7108877b
commit
049bd227ed
|
@ -1843,7 +1843,6 @@ int expand_string(const wcstring &input, std::vector<completion_t> &output, expa
|
|||
if (!(EXPAND_SKIP_HOME_DIRECTORIES & flags))
|
||||
expand_home_directory(next);
|
||||
|
||||
|
||||
if (flags & ACCEPT_INCOMPLETE)
|
||||
{
|
||||
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
|
||||
short-circuit and return
|
||||
*/
|
||||
if (!(flags & EXPAND_SKIP_PROCESS))
|
||||
{
|
||||
expand_pid(next, flags, output, NULL);
|
||||
}
|
||||
return EXPAND_OK;
|
||||
}
|
||||
else
|
||||
|
@ -1864,14 +1860,11 @@ int expand_string(const wcstring &input, std::vector<completion_t> &output, expa
|
|||
append_completion(*out, next);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(flags & EXPAND_SKIP_PROCESS) && ! expand_pid(next, flags, *out, errors))
|
||||
else if (! expand_pid(next, flags, *out, errors))
|
||||
{
|
||||
return EXPAND_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
in->clear();
|
||||
std::swap(in, out); // note: this swaps the pointers only (last output is next input)
|
||||
|
|
9
expand.h
9
expand.h
|
@ -50,17 +50,14 @@ enum
|
|||
/** Don't generate descriptions */
|
||||
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. */
|
||||
EXPAND_SKIP_JOBS = 1 << 8,
|
||||
EXPAND_SKIP_JOBS = 1 << 7,
|
||||
|
||||
/** Don't expand home directories */
|
||||
EXPAND_SKIP_HOME_DIRECTORIES = 1 << 9,
|
||||
EXPAND_SKIP_HOME_DIRECTORIES = 1 << 8,
|
||||
|
||||
/** Allow fuzzy matching */
|
||||
EXPAND_FUZZY_MATCH = 1 << 10
|
||||
EXPAND_FUZZY_MATCH = 1 << 9
|
||||
};
|
||||
typedef int expand_flags_t;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user