mirror of
https://github.com/nushell/nushell
synced 2025-01-28 21:05:48 +00:00
Better completions for external args
This commit is contained in:
parent
f80e9d4b60
commit
c884d5ca31
1 changed files with 3 additions and 3 deletions
|
@ -30,8 +30,6 @@ impl Completer for NuCompleter {
|
||||||
|
|
||||||
let flattened = flatten_block(&working_set, &output);
|
let flattened = flatten_block(&working_set, &output);
|
||||||
|
|
||||||
// println!("flattened: {:?}", flattened);
|
|
||||||
|
|
||||||
for flat in flattened {
|
for flat in flattened {
|
||||||
if pos >= flat.0.start && pos <= flat.0.end {
|
if pos >= flat.0.start && pos <= flat.0.end {
|
||||||
match &flat.1 {
|
match &flat.1 {
|
||||||
|
@ -84,7 +82,9 @@ impl Completer for NuCompleter {
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
}
|
}
|
||||||
nu_parser::FlatShape::Filepath | nu_parser::FlatShape::GlobPattern => {
|
nu_parser::FlatShape::Filepath
|
||||||
|
| nu_parser::FlatShape::GlobPattern
|
||||||
|
| nu_parser::FlatShape::ExternalArg => {
|
||||||
let prefix = working_set.get_span_contents(flat.0);
|
let prefix = working_set.get_span_contents(flat.0);
|
||||||
let prefix = String::from_utf8_lossy(prefix).to_string();
|
let prefix = String::from_utf8_lossy(prefix).to_string();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue