-
Notifications
You must be signed in to change notification settings - Fork 82
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
Ensure variables set by conf.d/fzf.fish are global and update uninstaller #122
Conversation
Hi @etcusrvar, thanks for contributing a bug fix! I'm afraid I don't understand. What does |
I probably should have tested this a bit more before opening this issue. In my local setup, I essentially follow this example-- but not exactly. for file in $fisher_path/conf.d/*.fish
source $file
end I have function __source_fisher_confd
for file in $fisher_path/conf.d/*.fish
source $file
end
end
__source_fisher_confd In the first case, the default scope when sourcing conf.d/fzf.fish is global, but in the second case, being wrapped in a function, the default scope is local. I have a few other fisher plugins installed that also set variables, but they explicitly set globals where appropriate, so I only saw this issue with your plugin. Even though the issue is with my setup, you may still want to explicitly use --global for |
Ohhh I see....I finally understand what the
Yes, making those explicitly global is a great idea. Thanks @etcusrvar ! |
Cool. Thanks! (Great extension, by the way.) |
…ller (PatrickF1#122) Explicitly declare the variables with the --global flag because if they get sourced from a function, they will be locally scoped to the function rather than globally scoped and therefore not picked up by fzf functions. This can happen if the user is using customizing fisher by using fisher_path and has to source their conf.d files themselves.
I believe you want this to be global.
If
fisher_path
is undefined and this file is in$__fish_config_dir/conf.d
, it will already be global by default.If
fisher_path
is defined, and$fisher_path/conf.d
has to be sourced manually, it will default to local, which I believe is not intended.