Sample script to fuzzy search with a preview
This commit is contained in:
parent
d4c9b89b6e
commit
8a3cd7f715
@ -296,20 +296,20 @@ PROMPT KEYS:
|
||||
|
||||
b -p
|
||||
6. For GUI and browser integration (or to sync bookmarks with your favourite bookmark management service) refer to the wiki page on [System integration](https://github.com/jarun/buku/wiki/System-integration).
|
||||
7. Handy (bash/zsh) commands to fuzzy search all URLs and open the selected one in Firefox:
|
||||
7. Handy (bash/zsh) commands to fuzzy search with fzf and open the selection in Firefox:
|
||||
|
||||
firefox $(buku -p -f 10 | fzf)
|
||||
firefox $(buku -p -f 40 | fzf | cut -f1)
|
||||
|
||||
POSIX script to allow cancellation as well:
|
||||
POSIX script to show a preview of the bookmark as well:
|
||||
|
||||
```sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
url=$(buku -p -f 40 | fzf | cut -f1)
|
||||
url=$(buku -p -f4 | fzf -m --reverse --preview "buku -p {1}" --preview-window=wrap | cut -f2)
|
||||
|
||||
if [ -n "$url" ]; then
|
||||
firefox "$url"
|
||||
echo "$url" | xargs firefox
|
||||
fi
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user