mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 06:41:14 -03:00
Remove expand_flag::skip_home_directories
This could in principle be used to prevent home directory expansion, but no call site uses it, so just remove it. No functional change here.
This commit is contained in:
@@ -1027,9 +1027,7 @@ expand_result_t expander_t::stage_braces(wcstring input, completion_receiver_t *
|
||||
}
|
||||
|
||||
expand_result_t expander_t::stage_home_and_self(wcstring input, completion_receiver_t *out) {
|
||||
if (!(flags & expand_flag::skip_home_directories)) {
|
||||
expand_home_directory(input, ctx.vars);
|
||||
}
|
||||
expand_home_directory(input, ctx.vars);
|
||||
expand_percent_self(input);
|
||||
if (!out->add(std::move(input))) {
|
||||
return append_overflow_error(errors);
|
||||
@@ -1199,9 +1197,7 @@ expand_result_t expander_t::expand_string(wcstring input, completion_receiver_t
|
||||
|
||||
if (total_result == expand_result_t::ok) {
|
||||
// Hack to un-expand tildes (see #647).
|
||||
if (!(flags & expand_flag::skip_home_directories)) {
|
||||
unexpand_tildes(input, ctx.vars, &completions);
|
||||
}
|
||||
unexpand_tildes(input, ctx.vars, &completions);
|
||||
if (!out_completions->add_list(std::move(completions))) {
|
||||
total_result = append_overflow_error(errors);
|
||||
}
|
||||
|
||||
@@ -40,8 +40,6 @@ enum class expand_flag {
|
||||
directories_only,
|
||||
/// Generate descriptions, stored in the description field of completions.
|
||||
gen_descriptions,
|
||||
/// Don't expand home directories.
|
||||
skip_home_directories,
|
||||
/// Allow fuzzy matching.
|
||||
fuzzy_match,
|
||||
/// Disallow directory abbreviations like /u/l/b for /usr/local/bin. Only applicable if
|
||||
|
||||
Reference in New Issue
Block a user