diff --git a/crates/shell/src/completion.rs b/crates/shell/src/completion.rs index fec1dae..5410797 100644 --- a/crates/shell/src/completion.rs +++ b/crates/shell/src/completion.rs @@ -62,6 +62,9 @@ fn complete_filenames(_is_start: bool, word: &str, matches: &mut Vec) { // Determine the full directory path to search let search_dir = if dir_path.starts_with('/') { dir_path.to_string() + } else if let Some(stripped) = dir_path.strip_prefix('~') { + let home_dir = dirs::home_dir().unwrap(); + format!("{}{}", home_dir.display(), stripped) } else { format!("./{}", dir_path) };