Skip to main content

complete_path

Function complete_path 

Source
pub fn complete_path(prefix: &str, parent_names: &[String]) -> Vec<String>
Expand description

Path completion: prefix may contain slashes; only the basename segment is matched.

Returned strings are full token replacements (include any directory part before the last /), so rustyline’s replace-from-start keeps paths like src/main.rs correct. parent_names are basenames in the resolved parent directory. Empty basename prefix returns all.