A random set of fixes (#1600)

This commit is contained in:
Jonathan Turner
2020-04-17 18:19:49 +12:00
committed by GitHub
parent ee778d2b03
commit 52d2d2b888
4 changed files with 29 additions and 8 deletions

View File

@ -69,15 +69,15 @@ impl NuCompleter {
for command in commands.iter() {
let mut pos = replace_pos;
let mut matched = true;
let mut matched = false;
if pos < line_chars.len() {
for chr in command.chars() {
if line_chars[pos] != chr {
matched = false;
break;
}
pos += 1;
if pos == line_chars.len() {
matched = true;
break;
}
}