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

Group descriptions need to be percent-expanded #24

Closed
romkatv opened this issue Jan 15, 2020 · 5 comments
Closed

Group descriptions need to be percent-expanded #24

romkatv opened this issue Jan 15, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@romkatv
Copy link
Contributor

romkatv commented Jan 15, 2020

I had an old completion setting like this:

zstyle ':completion:*' format ' %F{yellow}-- %d --%f'

With fzf-tab it ended up like this:

image

Perhaps put ${(%)some_variable} somewhere?

@Aloxaf Aloxaf added the bug Something isn't working label Jan 16, 2020
@Aloxaf
Copy link
Owner

Aloxaf commented Jan 16, 2020

This is a known issue but I am not sure how to deal with it.

If I expand it, it will overwrite the group color.
图片

I think keep them unexpanded will let users quickly realize that this is the problem of their own settings.

Of course it would be better if there is a better solution.

edit:

if anyone have this problem, add these lines to your zshrc

zstyle -d ':completion:*' format
zstyle ':completion:*:descriptions' format '[%d]'

@romkatv
Copy link
Contributor Author

romkatv commented Jan 16, 2020

Fine with me.

@kakulukia
Copy link

Hmm @romkatv how can you call that an old setting, when its the default installing a fresh copy of prezto? Happened to me yesterday. Took me a while to figure out whats wrong.

@romkatv
Copy link
Contributor Author

romkatv commented Oct 22, 2020

Hmm @romkatv how can you call that an old setting

When someone says "there is an old proverb", it doesn't mean this proverb is no longer used. It means it was used for the first time a long time ago. Likewise with an old setting, which I had in my zsh configs for a long time.

@montchr
Copy link

montchr commented Apr 8, 2023

if anyone have this problem, add these lines to your zshrc

zstyle -d ':completion:*' format
zstyle ':completion:*:descriptions' format '[%d]'

Using this suggested [%d] format did not work for me. However, I noticed that in other comments (e.g. #98 (comment)), @Aloxaf suggests a format of -- %d --. That format did end up working for me, though I'm not sure why the original suggestion had no effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants