I recently ran into fzf, which seems like a fantastic little tool, but there's one thing I'm having trouble with: given input with multiple fields per line, how do I configure it to return only a particular field when pressing enter? The accept action, which is the default binding for the enter key, doesn't accept any parameters...you can't use --bind enter:accept(1) or something like that.
The --nth and --with-nth options affect which fields are searched (--nth) or displayed (--with-nth), but don't impact what gets returned.
For example, if I run a command like:
ps -fe | fzf --some-options...
I'd like pressing enter on a line that looks like this:
root 2067 1 0 08:41 ? 00:00:00 /usr/sbin/gdm
To emit only 2067 on stdout.
Is the only option to post-process the output from fzf with another tool (e.g., awk)?