|
|
@ -719,9 +719,16 @@ impl EditorView {
|
|
|
|
|
|
|
|
|
|
|
|
let noop = |_input: &str| Vec::new();
|
|
|
|
let noop = |_input: &str| Vec::new();
|
|
|
|
let completer = match field_type {
|
|
|
|
let completer = match field_type {
|
|
|
|
Some("filename") => super::completers::filename,
|
|
|
|
Some(field_type) => {
|
|
|
|
Some("directory") => super::completers::directory,
|
|
|
|
if field_type.starts_with("filename") {
|
|
|
|
_ => noop,
|
|
|
|
super::completers::filename
|
|
|
|
|
|
|
|
} else if field_type.starts_with("directory") {
|
|
|
|
|
|
|
|
super::completers::directory
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
noop
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
None => noop,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
Prompt::new(
|
|
|
|
Prompt::new(
|
|
|
|
format!("{}: ", field_type.unwrap_or("arg")),
|
|
|
|
format!("{}: ", field_type.unwrap_or("arg")),
|
|
|
|