added shell completions for push and bookmarks

This commit is contained in:
2025-01-19 22:52:24 +01:00
parent 64e12222bd
commit 5c7a8548d4
4 changed files with 31 additions and 4 deletions
+6
View File
@@ -128,6 +128,12 @@ impl Bookmarks {
Ok(buffer)
}
/// get bookmarknames as space separated values in one string (for shell completions)
pub fn get_bookmarknames(&self) -> String {
let mut names: Vec<String> = self.bookmarks.keys().cloned().collect();
names.join(" ")
}
/// writes the bookmarks file
fn write_bookmark_file(&self) -> Result<()> {
let mut file_content = String::new();