docs: the fzf example copies on ctrl-y and copies and closes on ctrl-x

This commit is contained in:
keb committed 2026-10-14 21:24:01 +02:00
1 parent e8d3a3337a
commit 470f0c11e4
1 file changed
+6 -6
+6 -6
View File
@@ -157,10 +157,10 @@ instead, showing the names and acting on the links:
```sh ```sh
lazysecrets list | fzf --ansi --with-nth='2..-3' --accept-nth=-1 \ lazysecrets list | fzf --ansi --with-nth='2..-3' --accept-nth=-1 \
--header 'enter: link · ctrl-o: open · ctrl-y: copy value · alt-y: copy, stay' \ --header 'enter: link · ctrl-o: open · ctrl-y: copy value · ctrl-x: copy and close' \
--bind 'ctrl-o:become(lazysecrets open --action go --account {-2} {-1})' \ --bind 'ctrl-o:become(lazysecrets open --action go --account {-2} {-1})' \
--bind 'ctrl-y:become(lazysecrets get --account {-2} {-1} | pbcopy)' \ --bind 'ctrl-y:execute-silent(lazysecrets get --account {-2} {-1} | pbcopy)+change-header(Copied the value of {2..-3})' \
--bind 'alt-y:execute-silent(lazysecrets get --account {-2} {-1} | pbcopy)+change-header(Copied the value of {2..-3})' --bind 'ctrl-x:become(lazysecrets get --account {-2} {-1} | pbcopy)'
``` ```
`--with-nth='2..-3'` shows and searches only the names; `{-1}` and `--with-nth='2..-3'` shows and searches only the names; `{-1}` and
@@ -169,9 +169,9 @@ one word, so this works without `--delimiter`. To filter by kind
yourself: `awk -F'\t' '$1 == "secret"'`. yourself: `awk -F'\t' '$1 == "secret"'`.
`enter` prints the link (`lazysecrets get $(…)`), `ctrl-o` opens it in `enter` prints the link (`lazysecrets get $(…)`), `ctrl-o` opens it in
lazysecrets, `ctrl-y` copies the value and closes fzf, and `alt-y` copies lazysecrets, `ctrl-y` copies the value, saying so in the header, and
it and stays, saying so in the header (`pbcopy` on macOS; `wl-copy` or `ctrl-x` copies it and closes fzf (`pbcopy` on macOS; `wl-copy` or `xclip`
`xclip` on Linux). A value copied this way isn't cleared from the on Linux). A value copied this way isn't cleared from the
clipboard after `values.clipboardClear`, as one copied in lazysecrets is. clipboard after `values.clipboardClear`, as one copied in lazysecrets is.
`--account` makes `open` and `get` use the account it was listed through, `--account` makes `open` and `get` use the account it was listed through,