Implemented -o opt for complete/compgen builtins

Completion candidates now come with a space by default, unless it's a directory
This commit is contained in:
2026-02-27 09:44:33 -05:00
parent f7e3d18502
commit 105cf7c275
11 changed files with 161 additions and 68 deletions

View File

@@ -675,7 +675,6 @@ impl ViNormal {
// Double inputs
('?', Some(VerbCmd(_, Verb::Rot13)))
| ('d', Some(VerbCmd(_, Verb::Delete)))
| ('c', Some(VerbCmd(_, Verb::Change)))
| ('y', Some(VerbCmd(_, Verb::Yank)))
| ('=', Some(VerbCmd(_, Verb::Equalize)))
| ('u', Some(VerbCmd(_, Verb::ToLower)))
@@ -685,6 +684,9 @@ impl ViNormal {
| ('<', Some(VerbCmd(_, Verb::Dedent))) => {
break 'motion_parse Some(MotionCmd(count, Motion::WholeLineInclusive));
}
('c', Some(VerbCmd(_, Verb::Change))) => {
break 'motion_parse Some(MotionCmd(count, Motion::WholeLineExclusive));
}
('W', Some(VerbCmd(_, Verb::Change))) => {
// Same with 'W'
break 'motion_parse Some(MotionCmd(