docs: the fzf example for lazysecrets list hides the link and binds open and copy

This commit is contained in:
keb committed 2026-10-14 21:24:01 +02:00
1 parent 3734989b15
commit 572cea8351
2 files changed
+11 -4

No files matched your search

+10 -3
View File
@@ -144,11 +144,18 @@ tab-separated. It's what Go to searches, so fzf, or an editor's picker,
can search it instead, showing the names and acting on the links:
```sh
lazysecrets list | fzf --ansi --delimiter='\t' --with-nth=1 \
--bind 'enter:become(lazysecrets open {2})' \
--bind 'ctrl-y:execute-silent(lazysecrets get {2} | pbcopy)'
lazysecrets list | fzf --ansi --with-nth='..-2' --accept-nth=-1 \
--bind 'ctrl-o:become(lazysecrets open {-1})' \
--bind 'ctrl-y:execute-silent(lazysecrets get {-1} | pbcopy)'
```
`--with-nth='..-2'` shows and searches the names, leaving out the link,
the last field; `{-1}` and `--accept-nth=-1` are the link. `enter` prints
it (`lazysecrets get $(…)`), `ctrl-o` opens it in lazysecrets and `ctrl-y`
copies the value (`pbcopy` on macOS; `wl-copy` or `xclip` on Linux). A
value copied this way isn't cleared from the clipboard after
`values.clipboardClear`, as one copied in lazysecrets is.
What's [cached](config.md#cache) prints at once. Then, like Go to, it loads
what's missing or older than `--max-age` (2m), and what's new in it follows
as it arrives: fzf shows it while you type. `--cached` loads nothing from