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

Can't get aliases added to Bash completion #91

Closed
yermulnik opened this issue Aug 29, 2024 · 7 comments · May be fixed by Homebrew/brew#18791
Closed

Can't get aliases added to Bash completion #91

yermulnik opened this issue Aug 29, 2024 · 7 comments · May be fixed by Homebrew/brew#18791

Comments

@yermulnik
Copy link
Contributor

I'm truing to debug why Bash completion for Brew aliases work on one of my systems, while it doesn't on another.
"Affected" system:

> brew --version
Homebrew 4.3.18

> brew tap | fgrep alias
homebrew/aliases

> brew tap-info homebrew/aliases
homebrew/aliases: Installed
3 commands
/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-aliases (243 files, 908.8KB)
From: https://github.com/Homebrew/homebrew-aliases

> tree -L 1 ~/.brew-aliases/
/home/yz/.brew-aliases/
├── list_installed_files
├── list_installed_packages_by_date
├── list_installed_packages_by_name
├── list_installed_packages_versions
├── RCS
├── show
└── which

1 directory, 6 files

> ls -l /home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew
lrwxrwxrwx 1 yz yz 36 Nov 15  2020 /home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew -> ../../Homebrew/completions/bash/brew

> ls -l /home/linuxbrew/.linuxbrew/bin/brew-*
lrwxrwxrwx 1 yz yz 43 Aug 29 17:52 /home/linuxbrew/.linuxbrew/bin/brew-list_installed_files -> /home/yz/.brew-aliases/list_installed_files
lrwxrwxrwx 1 yz yz 43 Aug 29 17:27 /home/linuxbrew/.linuxbrew/bin/brew-list-installed-files -> /home/yz/.brew-aliases/list_installed_files
lrwxrwxrwx 1 yz yz 54 Aug 29 17:52 /home/linuxbrew/.linuxbrew/bin/brew-list_installed_packages_by_date -> /home/yz/.brew-aliases/list_installed_packages_by_date
lrwxrwxrwx 1 yz yz 54 Aug 29 17:28 /home/linuxbrew/.linuxbrew/bin/brew-list-installed-packages-by-date -> /home/yz/.brew-aliases/list_installed_packages_by_date
lrwxrwxrwx 1 yz yz 54 Aug 29 17:52 /home/linuxbrew/.linuxbrew/bin/brew-list_installed_packages_by_name -> /home/yz/.brew-aliases/list_installed_packages_by_name
lrwxrwxrwx 1 yz yz 54 Aug 29 17:28 /home/linuxbrew/.linuxbrew/bin/brew-list-installed-packages-by-name -> /home/yz/.brew-aliases/list_installed_packages_by_name
lrwxrwxrwx 1 yz yz 55 Aug 29 17:52 /home/linuxbrew/.linuxbrew/bin/brew-list_installed_packages_versions -> /home/yz/.brew-aliases/list_installed_packages_versions
lrwxrwxrwx 1 yz yz 55 Aug 29 17:28 /home/linuxbrew/.linuxbrew/bin/brew-list-installed-packages-versions -> /home/yz/.brew-aliases/list_installed_packages_versions
lrwxrwxrwx 1 yz yz 27 Aug 29 17:23 /home/linuxbrew/.linuxbrew/bin/brew-show -> /home/yz/.brew-aliases/show
lrwxrwxrwx 1 yz yz 28 Aug 19  2022 /home/linuxbrew/.linuxbrew/bin/brew-which -> /home/yz/.brew-aliases/which

> . /home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew

> brew li<tab><tab>
link       linkage    list       livecheck

Is there anything I can take a look into to understand why the same setup on another system works w/o issues and lists Brew aliases? Maybe some specific place inside /home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew file that I couldn't identify during my own investigation? 🤔
Thanks.

@MikeMcQuaid
Copy link
Member

Please open a discussion rather than an issue for this, sorry. Want to keep issues for reproducible problems.

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2024
@yermulnik
Copy link
Contributor Author

Please open a discussion rather than an issue for this, sorry. Want to keep issues for reproducible problems.

@MikeMcQuaid That makes sense, though I have no option to open discussion in this repo 🤷🏻
изображение

@MikeMcQuaid
Copy link
Member

@yermulnik https://github.com/homebrew/discussions

@yermulnik
Copy link
Contributor Author

Thanks for the pointer.
Opened: https://github.com/orgs/Homebrew/discussions/5579

@yermulnik
Copy link
Contributor Author

yermulnik commented Nov 18, 2024

Opening discussion wasn't helpful 😞
I assumed that Brew aliases should be picked up for completion by default, though they ain't.
I've now found even that system that picked them up previously, now doesn't do that anymore. Seems like something has changed on Brew side and aliases component has started to lag behind since then.
@MikeMcQuaid Seeking your assistance in at least the direction to look into or a place to ask for help. Thanks.

@MikeMcQuaid
Copy link
Member

@yermulnik Sorry that discussions haven't helped but can't help any more here, either. If you figure out the fix we'll review a PR.

yermulnik added a commit to yermulnik/brew that referenced this issue Nov 19, 2024
Add Bash completion support for Homebrew aliases:
https://github.com/Homebrew/homebrew-aliases

Unfortunately I'm not familiar enough neither with Ruby, nor with Fish/Zsh 🤷🏻

Fixes Homebrew/homebrew-aliases#91
@yermulnik
Copy link
Contributor Author

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

Successfully merging a pull request may close this issue.

2 participants