Open apjanke opened 9 months ago
Oh, yeah, this looks completion-related. I uninstalled bash
from Homebrew and MacPorts on this box, and then re-installed bash-completion on both of them, and now the errors have changed and are saying more stuff about completion.
Maybe this is a problem with both MacPorts and Homebrew trying to control files in the main /etc
dir?
Almost certainly completion:
homebrew/etc/bash_completion.d on î‚ master (302e83e9a)
:; grep have * | more
grep: helpers: Is a directory
abook:have abook &&
ant:have ant &&
ant:have complete-ant-cmd.pl && \
apache2ctl:have apache2ctl && {
apt:have apt-get &&
apt:have apt-cache &&
apt-build:have apt-build &&
aptitude:have aptitude && {
aptitude:have grep-status && {
etc
have
is defined by homebrew/etc/bash-completion
(not .d):
have()
{
unset -v have
# Completions for system administrator commands are installed as well in
# case completion is attempted via `sudo command ...'.
PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null &&
have="yes"
}
Certainly mixing macports and homebrew is weird, and might introduce conflicts since neither is reconciling with the other, but I don't know of any specific conflict offhand.
Ah, good catch. I did a brew rm bash-completion
and the errors went away.
I've got an oddball system here, and it's probably due to that: up until recently, I was a macOS 10.14 Mojave holdout, and thinking about migrationg Octave.app to MacPorts, so running MacPorts for the last couple years, and then recently added Homebrew back in. And set up these dotfiles to conditionally load them, but seems like you can't easily fully conditionalize loading in MacPorts. Or, more likely, I'm just doing it wrong.
I think I'll prolly just uninstall MacPorts here, and stick to one or the other of it or Homebrew on each machine.
Thanks, @aredridel!
For the last week or so, when I fire up
bash
from inside a zsh session inside a Mac terminal (iTerm2) using these dotfiles, I get a bunch of error messages like "bash: have: command not found".I don't know what would be calling
have
; I don't seem to be doing so inside my bashy dotfiles here.Maybe it's some bash completion thing? https://stackoverflow.com/questions/12874920/have-keyword-for-bash-completion
Symptoms
No idea what's going on here. I don't see any
have
calls in my dotfiles.This is on at least angharad, my macOS 14.2.1 iMac on Intel Mac.
TODO