-
Describe the bugI found some potential error. I expect that For example I "wrongly" inserted ascii art function to the last line of config.fish:
I started fzf history search and the colorscript is shown instead of command preview. I started search file, and color script is shown instead of preview of file. Maybe it is some behavior of fish, but there has to be explanation why the lines of config.fish are call if your preview is shown. If the config.fish is called for each preview, it is very bad. Steps to ReproduceDownload DT gitlab colorscript, place last row ScreenshotsEnvironmentVersions installed:
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
This is expected. Preview spawns a new instance of fish, so if you put unrelated stuff in
It is not. fzf has to create preview by running commands in a new shell. If you use e.g. zsh it will need to load |
Beta Was this translation helpful? Give feedback.
-
Yup, the way fzf previews work is they spawn a new instance of $SHELL. And whenever a new shell starts up, it loads its config files. |
Beta Was this translation helpful? Give feedback.
-
Thanks for info. So, it is just calling of I don't use interactive block, but I used
Is it correct or there is some hidden problem? Just small question before closing this issue. The preview is using bat, is there some possibility to show images and pdf files content? Can you give me some trick to it, thanks again. |
Beta Was this translation helpful? Give feedback.
-
fzf preview loads a new shell. Whenever a new shell starts up, it loads config.fish.
I'd recommend moving your functions out of config.fish and defining them as autoloaded functions.
Seems fine to me.
|
Beta Was this translation helpful? Give feedback.
-
Related question: #254. |
Beta Was this translation helpful? Give feedback.
Yup, the way fzf previews work is they spawn a new instance of $SHELL. And whenever a new shell starts up, it loads its config files.