Skip to content
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

[Q] Using FZF_DEFAULT_OPTS. #475

Closed
pablospe opened this issue Oct 2, 2024 · 5 comments
Closed

[Q] Using FZF_DEFAULT_OPTS. #475

pablospe opened this issue Oct 2, 2024 · 5 comments
Labels
question Further information is requested

Comments

@pablospe
Copy link

pablospe commented Oct 2, 2024

After this commit: 0b49f3e (fix: always ignore FZF_DEFAULT_OPTS)
How do you set to actually use FZF_DEFAULT_OPTS, if one wants to?

@pablospe pablospe added the question Further information is requested label Oct 2, 2024
@PrayagS
Copy link
Contributor

PrayagS commented Oct 5, 2024

+1. Dumping all my flags in fzf-flags has no effect for some reason.

Can this be turned into an optional behavior? Default can be to ignore FZF_DEFAULT_OPTS. Happy to open a PR if that sounds good.

@pablospe
Copy link
Author

pablospe commented Oct 6, 2024

Can this be turned into an optional behavior? Default can be to ignore FZF_DEFAULT_OPTS. Happy to open a PR if that sounds good

If you know how to do it, please create a PR. I think few people will benefit from it, even if it is not merged in main. I understand the reason why to ignore FZF_DEFAULT_OPTS, but it also creates a usability problem (at least it is not document properly, as far as I understand, perhaps it is an easy fix).

PrayagS added a commit to PrayagS/fzf-tab that referenced this issue Oct 6, 2024
Ref: Aloxaf#475

Aloxaf@0b49f3e
introduces a change that makes the plugin ignore `FZF_DEFAULT_OPTS` by
default.

This commit adds a flag to disable this behavior.

Signed-off-by: PrayagS <[email protected]>
PrayagS added a commit to PrayagS/fzf-tab that referenced this issue Oct 6, 2024
Ref: Aloxaf#475

Aloxaf@0b49f3e introduces a change that makes the plugin ignore
`FZF_DEFAULT_OPTS` by default.

This commit adds a flag to disable this behavior.

Signed-off-by: PrayagS <[email protected]>
@PrayagS
Copy link
Contributor

PrayagS commented Oct 6, 2024

If you know how to do it, please create a PR. I think few people will benefit from it, even if it is not merged in main.

Opened the PR: #479

I understand the reason why to ignore FZF_DEFAULT_OPTS, but it also creates a usability problem (at least it is not document properly, as far as I understand, perhaps it is an easy fix).

It was documented recently from what I see.

fzf-tab/README.md

Lines 118 to 119 in cf57116

# NOTE: fzf-tab does not follow FZF_DEFAULT_OPTS
zstyle ':fzf-tab:*' fzf-flags --color=fg:1,fg+:2 --bind=tab:accept

The issue I saw with using fzf-flags is that most users of this plugin also use https://github.com/Freed-Wu/fzf-tab-source/ which overrides the value of fzf-flags. The final value of fzf-flags that I was seeing in my shell wasn't showing up as expected.

If someone is not using that plugin, I suppose fzf-flags should work directly without needing this patch.

PrayagS added a commit to PrayagS/dotfiles that referenced this issue Oct 6, 2024
Ref: Aloxaf/fzf-tab#475 (comment)

TLDR: Add a flag to make the plugin respect `FZF_DEFAULT_OPTS`.

Signed-off-by: PrayagS <[email protected]>
@Aloxaf
Copy link
Owner

Aloxaf commented Oct 9, 2024

You can use FZF_DEFAULT_OPTS by this:

zstyle ':fzf-tab:*' fzf-flags ${(z)FZF_DEFAULT_OPTS}

@pablospe
Copy link
Author

pablospe commented Oct 9, 2024

Thanks for the answer, @Aloxaf! Unfortunately, this didn't work for me, see this comment:
#479 (comment)

Aloxaf pushed a commit that referenced this issue Oct 11, 2024
* Add `use-fzf-default-opts`

Ref: #475

0b49f3e introduces a change that makes the plugin ignore
`FZF_DEFAULT_OPTS` by default.

This commit adds a flag to disable this behavior.

Signed-off-by: PrayagS <[email protected]>

* Add an additional note for `use-fzf-default-opts`

Signed-off-by: PrayagS <[email protected]>

---------

Signed-off-by: PrayagS <[email protected]>
@Aloxaf Aloxaf closed this as completed Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants