unixorn / fzf-zsh-plugin

ZSH plugin to enable fzf searches of a lot more stuff - docker, tmux, homebrew and more.
Apache License 2.0
312 stars 29 forks source link

Custom fzf install directory #64

Closed caojoshua closed 2 years ago

caojoshua commented 2 years ago

Description

Allows user to specify a custom fzf install directory. By default, it is still installed in ~/.fzf.

My main motivation is that I would prefer to install in ~/.config. The current support for this is broken, as fzf-settings.zsh only sources from ~/.fzf. In addition, the scripts only installs in ~/.config when ~/.config/fzf is present, but this requires users deliberately creating this directory, and no one would know since there is no documentation for this.

As an alternative, I have another branch where I implemented installing in ~/.config by default. Not sure if this is a good idea though, because it will change the install locations for current users and may be breaking.

Checklist

License Acceptance

unixorn commented 2 years ago

Maybe have it read ~/.fzf-zsh-plugin.conf if present and use the contents of that as the directory? Passing the directory as an argument won't work with most frameworks.

caojoshua commented 2 years ago

The motivation for a custom installation directory is to avoid adding more entries to ~/, so I would not want to add another config file there.

I added a change where we can set an environment variable. I think this is cleaner, since there are other environment variables that are being used, and it should work with any framework.

unixorn commented 2 years ago

The motivation for a custom installation directory is to avoid adding more entries to ~/, so I would not want to add another config file there.

Fair enough.

I added a change where we can set an environment variable. I think this is cleaner, since there are other environment variables that are being used, and it should work with any framework.

That works too. People already have to customize their ~/.zshrc to cope with whatever framework they're using, so it isn't too much extra work