fixed bookmarks completions and error messages

This commit is contained in:
2025-06-24 22:42:22 +02:00
parent 76d1817a1e
commit fe54a75c99
3 changed files with 13 additions and 6 deletions
+9 -2
View File
@@ -158,8 +158,15 @@ impl Bookmarks {
}
/// get bookmarknames as space separated values in one string (for shell completions)
pub fn get_bookmarknames(&self) -> String {
let names: Vec<String> = self.bookmarks.keys().cloned().collect();
pub fn get_bookmark_names(&self) -> String {
let mut copy = self.bookmarks.clone();
for (name, path) in copy.clone() {
if !path.is_dir() {
_ = copy.remove(&name);
}
}
let names: Vec<String> = copy.keys().cloned().collect();
names.join(" ")
}