From 344f14c86f4432bad7b5710c4101b9e5edc0b96d Mon Sep 17 00:00:00 2001 From: Justine Date: Wed, 8 Feb 2023 23:46:19 +0100 Subject: [PATCH] Fixed autocomplete for the case where search string gives nothing on a file search --- src/shell/autocomplete.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/shell/autocomplete.rs b/src/shell/autocomplete.rs index 1099adb..1e3dfb5 100644 --- a/src/shell/autocomplete.rs +++ b/src/shell/autocomplete.rs @@ -189,8 +189,7 @@ fn autocomplete_file(search: &Search) -> std::io::Result<(String, String)> { } if nbr_found == 0 { - let ret_val = format!("{}{}", &search.command, &search.searchee); - return Ok((ret_val, String::new())); + *&mut last_found = search.searchee.clone(); } //Handle the path when tabbing in a long path, zsh-like