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

brew plugin completion is not working. #12183

Open
marknefedov opened this issue Jan 26, 2024 · 0 comments
Open

brew plugin completion is not working. #12183

marknefedov opened this issue Jan 26, 2024 · 0 comments

Comments

@marknefedov
Copy link

marknefedov commented Jan 26, 2024

Describe the bug

See title.

Steps to reproduce

Enable brew plugin
type brew
press tab
Folder is suggested
run compinit
type brew
press tab
brew completion appears

Expected behavior

proper completion init

Screenshots and recordings

Screenshot.2024-01-26.at.19.34.51.mp4

OS / Linux distribution

macOS 14.3

Zsh version

5.9

Terminal emulator

macOS terminal

If using WSL on Windows, which version of WSL

None

Additional context

It looks like Oh my zsh initialized completion before brew plugin sets up a completion.
Doing as in #12024 fixes problem, but them plugin double adds path to fpath.
We need either to remove fpath addition from plugin or fix initialization order.

if [[ -z "$HOMEBREW_PREFIX" ]]; then
# Maintain compatability with potential custom user profiles, where we had
# previously relied on always sourcing shellenv. OMZ plugins should not rely
# on this to be defined due to out of order processing.
export HOMEBREW_PREFIX="$(brew --prefix)"
fi
if [[ -d "$HOMEBREW_PREFIX/share/zsh/site-functions" ]]; then
fpath+=("$HOMEBREW_PREFIX/share/zsh/site-functions")
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant