We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2220ed7 commit e7a6b79Copy full SHA for e7a6b79
2 files changed
src/shell.rs
@@ -106,6 +106,7 @@ impl<'vm> RustylineReadline<'vm> {
106
let mut repl = Editor::with_config(
107
Config::builder()
108
.completion_type(CompletionType::List)
109
+ .tab_stop(4)
110
.build(),
111
);
112
repl.set_helper(Some(ShellHelper::new(vm, scope)));
src/shell/rustyline_helper.rs
@@ -155,7 +155,11 @@ impl Completer for ShellHelper<'_> {
155
if pos != line.len() {
156
return Ok((0, vec![]));
157
}
158
- Ok(self.complete_opt(line).unwrap_or((0, vec![])))
+ Ok(self
159
+ .complete_opt(line)
160
+ // as far as I can tell, there's no better way to do both completion
161
+ // and indentation (or even just indentation)
162
+ .unwrap_or_else(|| (line.len(), vec![" ".to_string()])))
163
164
165
0 commit comments