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
13
expand.cpp
13
expand.cpp
|
@ -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);
|
||||
}
|
||||
expand_pid(next, flags, output, NULL);
|
||||
return EXPAND_OK;
|
||||
}
|
||||
else
|
||||
|
@ -1864,12 +1860,9 @@ int expand_string(const wcstring &input, std::vector<completion_t> &output, expa
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
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