Skip to content

Add support for _ZO_FZF_OPTS_FILE similar to FZF_DEFAULT_OPTS_FILE. #1203

@sakkada

Description

@sakkada

First of all, thank you for such great tool!)

In zoxide/src/cmd/query.rs we have:

    fn get_fzf() -> Result<FzfChild> {
        let mut fzf = Fzf::new()?;
        if let Some(fzf_opts) = config::fzf_opts() {
            fzf.env("FZF_DEFAULT_OPTS", fzf_opts)
        } else {
            fzf.args([
                // Search mode
                "--exact",
                .
                .
                .
            ])
            .enable_preview()
        }
        .spawn()

It will be convenient to have ability to overwrite FZF_DEFAULT_OPTS_FILE for current fzf call within zoxide to allow redefine whole bunch of settings in one file without having a mess in different containers, like in *.bat files, *.sh, .vifmrc, etc.

That way if I want to have different configs for cmd/pwsh/bash/zsh/fish and for vifm, I will just set _ZO_FZF_OPTS_FILE value to desired file paths, configs will be stored in files and managed easily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions