Expand multiple items, manipulating each item first #4153
-
I'm implementing
example of items: With Any ideas? Much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You could try to take advantage of Then, pipe the output into fd -a --format $'{/.}\x1e{}' | fzf --delimiter '\x1e' --with-nth 1 --preview 'echo {+2}' Footnotes |
Beta Was this translation helpful? Give feedback.
You could try to take advantage of
fd
's--format
flag by adding the listed values twice: once as{/.}
, the basename without the file extension, and once as{}
, the normal path, separated by a character you like. In the example below, theRecord separator
\x1e
1 2 is used.Then, pipe the output into
fzf
, set thedelimiter
to your chosen character, and control what is displayed with--with-nth
. After this, you can use{1}
or{2}
to perform the desired action.Footnotes
ASCII Table -- Nonprintable Characters ↩
RFC 20 - ASCII format for network interchange ↩