-
Notifications
You must be signed in to change notification settings - Fork 93
[Documentation] preview cmd variables must be exported to be read by _fzf_preview_file #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sorry, I was guarding some part of my config with |
Hi, did you see https://github.com/PatrickF1/fzf.fish/wiki/Troubleshooting#fzf_preview_file_cmd-and-fzf_preview_dir_cmd-not-being-used? How can I reword that so it's easier for people to find? |
Well, I think you did well, I just didn't thought of checking the wiki.. I have a # Better dir and file previews
set fzf_preview_dir_cmd preview
set fzf_preview_file_cmd preview
# Edit with nvim on search-directory
set fzf_directory_opts --bind "ctrl-e:execute($EDITOR {} &> /dev/tty)"
# Exclude the command timestamp from the search scope when in Search History
set fzf_history_opts "--nth=4.."
# Make history respect chronological order
set fzf_history_opts --no-sort
# Not neccesary if not interactive, besides this guards on bootstrap
if not status is-interactive
exit
end
# Default bindings but bind Search Directory to Ctrl+F and Search Variables to Ctrl+Alt+V prepending $
fzf_configure_bindings --directory=\cf --variables= This needs to be guarded because For reference, how I bootstrap fisher: # Do not pollute fish config folder, use a subfolder
# https://github.com/jorgebucaran/fisher/issues/677
if set -q XDG_CONFIG_HOME
set -gx fisher_path $XDG_CONFIG_HOME/fish/fisher
else
set -gx fisher_path $HOME/.config/fish/fisher
end
set fish_function_path $fish_function_path[1] $fisher_path/functions $fish_function_path[2..-1]
set fish_complete_path $fish_complete_path[1] $fisher_path/completions $fish_complete_path[2..-1]
# Automatic things only in interactive mode
if status is-interactive
if not functions -q fisher
echo "Fisher not found, installing..."
curl -sL https://git.io/fisher | source && fisher update || fisher install "jorgebucaran/fisher"
end
end
for file in $fisher_path/conf.d/*.fish
source $file
end |
Uh oh!
There was an error while loading. Please reload this page.
This took me a while to debug.
When setting
fzf_preview_file_cmd
andfzf_preview_dir_cmd
as stated in https://github.com/PatrickF1/fzf.fish#change-how-search-directory-previews-directories-and-regular-files example:those settings are not honored. This is because (I think)
_fzf_preview_file
is executed in a subshell byfzf
.I've tried to export those variables:
with no luck
The text was updated successfully, but these errors were encountered: