laktak / extrakto

extrakto for tmux - quickly select, copy/insert/complete text without a mouse
MIT License
878 stars 45 forks source link

Add a flag to provide fzf options #65

Closed cibinmathew closed 3 years ago

cibinmathew commented 3 years ago

Add env variable to provide fzf options eg: set -g @extrakto_fzf_options "--preview 'cat {}'"

laktak commented 3 years ago

While I haven't tested this you should be able to set @extrakto_fzf_tool to "fzf --preview 'cat {}'".

cibinmathew commented 3 years ago

This didnt work because of it checking for the fzf path with the entire string I guess. I tried with a new variable but it failed in picking it.

laktak commented 3 years ago

Yes, it fails because bash expands ' in a strange way.

You can put fzf --preview 'cat {}' "$@" into a script file and then point @extrakto_fzf_tool to it. Not sure if that is what you want but it can preview absolute paths.

laktak commented 3 years ago

Closing as well.