5 ms·
Couldn't you "one time" process your history file to remove the line wraps (and make it appear that you ran a bunch of very long commands)?
by bombcar 6y ago
Couldn't you "one time" process your history file to remove the line wraps (and make it appear that you ran a bunch of very long commands)?
- oblio 6y agoYou're misreading what I'm saying, it's the other way around. fzf doesn't support line wrapping very long lines. 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...
- bombcar 6y agoAh that makes more sense and seems like a serious limitation
- neilparikh 6y agoAs a hack, you could do pre process to hide some of the common prefix, pass it into FZF, and then post process to add back the prefix, before finally running it. 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).