From 95feb1ff16317c53b708ac0b99566f88527f3534 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Tue, 3 Sep 2019 06:06:25 +1200 Subject: [PATCH 1/9] Fix line completion for extended chars --- src/shell/completer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shell/completer.rs b/src/shell/completer.rs index 80ed6cfbbf..9e8d4ea827 100644 --- a/src/shell/completer.rs +++ b/src/shell/completer.rs @@ -37,8 +37,8 @@ impl NuCompleter { } } - let line_chars: Vec<_> = line.chars().collect(); - let mut replace_pos = pos; + let line_chars: Vec<_> = line[..pos].chars().collect(); + let mut replace_pos = line_chars.len(); while replace_pos > 0 { if line_chars[replace_pos - 1] == ' ' { break; From d5494e58a4cbbaaebca435a417819ff55e544f21 Mon Sep 17 00:00:00 2001 From: est31 Date: Mon, 2 Sep 2019 21:12:09 +0200 Subject: [PATCH 2/9] ExtractType doesn't have to be implemented for Option any more --- src/object/types.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/object/types.rs b/src/object/types.rs index 2f17ed6f03..7965c76023 100644 --- a/src/object/types.rs +++ b/src/object/types.rs @@ -15,19 +15,6 @@ impl ExtractType for T { ))) } } -impl ExtractType for Option { - fn extract(value: &Tagged) -> Result, ShellError> { - let name = std::any::type_name::(); - trace!("