Closed tobx closed 10 months ago
I would recommend using an external tool to pre-process the input.
printf '1:2:;3' |
awk -F'[:;]+' 'BEGIN {OFS=" : "} {print $0 "\t" $1, $3, $2}' |
fzf --delimiter "\t" --with-nth 2.. |
awk -F"\t" '{print $1}'
--with-nth
to hide the original line and display only the formatted text (2..
)This approach is much more flexible than the suggested option. You can use any tool you want to format the text any way you want.
@junegunn This does not work if you also want to use --nth
. And with --display-delimiter
it would be possible to make fzf
not match the delimiter itself in a search.
man fzf
)Info
Problem / Steps to reproduce
I would love to have an option to show a different delimiter in the finder than the one used in the background. This would also solve #2154.
Example:
This displays
1:32:;
in the finder.Introducing a new option like
--display-delimiter
could solve that problem:This could easily display
1 : 3 : 2
, because https://github.com/junegunn/fzf/issues/2154#issuecomment-682589184 would not be a problem in this case.This would also enable users to use a "safe" delimiter like NUL and display a human readable delimiter in the finder.