Use menu behavior when completing change-directory
This makes "cd<space><ret>" change to the first completion, not to $HOME. This might be surprising but it should make sense. I don't have a concrete motivation but this should save a Tab press in some scenarios.
This commit is contained in:
parent
a1715a0c41
commit
69053d9623
|
@ -2555,7 +2555,8 @@ const CommandDesc change_directory_cmd = {
|
||||||
return { 0_byte, cursor_pos,
|
return { 0_byte, cursor_pos,
|
||||||
complete_filename(prefix,
|
complete_filename(prefix,
|
||||||
context.options()["ignored_files"].get<Regex>(),
|
context.options()["ignored_files"].get<Regex>(),
|
||||||
cursor_pos, FilenameFlags::OnlyDirectories) };
|
cursor_pos, FilenameFlags::OnlyDirectories),
|
||||||
|
Completions::Flags::Menu };
|
||||||
}),
|
}),
|
||||||
[](const ParametersParser& parser, Context&, const ShellContext&)
|
[](const ParametersParser& parser, Context&, const ShellContext&)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user