Say I would like to edit a file ./long/path/to/my/file/test.py with Vim, but I do not remember the path to the file.
In this case, I would run vim `fzf` to use fuzzy search to find and edit the file.
What gets stored in my ~/.zsh_history is vim `fzf`, which makes sense. I was wondering if it is possible to add an entry in the history that includes the expanded command, e.g., vim ./long/path/to/my/file/test.py. This would be useful not only for having a more accurate history but also in other programs like fasd and McFly.
fzf, bind a key to a widget that callsfzfand inserts the result. For example github.com/amaya382/zsh-fzf-widgets (no idea if it's good, it was just the top google hit for “zsh fzf widget”).