by oblio · 5y ago · 0 comments
My Ctrl-R config is at https://gist.github.com/brbsix/5e4f18833133b3accac78e3331292... but the line below is the relevant bit:
# View full command in preview window (?)
export FZF_CTRL_R_OPTS="${FZF_CTRL_R_OPTS:+$FZF_CTRL_R_OPTS }--preview 'echo {}' --preview-window down:5:hidden:wrap --bind '?:toggle-preview'"I have really long commands in my shell history and fzf just truncates them, which makes it pretty useless in many cases, since those commands are similar or identical up to 80-100-120 characters.
So in many situations I kind of have to guess which command has the parameter that I want at the end.
It's not that my shell history has lines with line wrap in them, it's that fzf can't show long commands on multiple lines so that I can see the entire command...
Basically, something like:
history | strip-prefix | fzf | add-prefix | bash
I'm not sure if it would be useful, but I think it's worth a try (and would be a fun project).