Closed spuder closed 5 years ago
Hi @spuder , thank you for reporting this.
The problem is that the formula depends on the bash-completion
formula (read here for more information).
For now, you can install the missing formula with:
brew install bash-completion
I will update the README
file to note this dependency until I update the formula to require this.
@spuder can you please try installing the missing formula and let me know if all good? Thank you!
I've tried installing bash-completion and also followed the instructions of that package
brew install bash-completion
echo '[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion' >> ~/.bash_profile
Then I open a new bash terminal, but goto still isn't in part of the path.
Same for me, even after installing bash_completion
, I got the same error message.
Unfortunately I still can't reproduce it on my machine.
If that can help, I know have this error each time I open a new terminal :
/usr/local/etc/bash_completion:59: command not found: shopt /usr/local/etc/bash_completion:65: command not found: complete /usr/local/etc/bash_completion:72: command not found: complete /usr/local/etc/bash_completion:73: command not found: complete /usr/local/etc/bash_completion:74: command not found: complete /usr/local/etc/bash_completion:76: command not found: complete /usr/local/etc/bash_completion:77: command not found: complete /usr/local/etc/bash_completion:79: command not found: complete /usr/local/etc/bash_completion:80: command not found: complete /usr/local/etc/bash_completion:81: command not found: complete /usr/local/etc/bash_completion:82: command not found: complete /usr/local/etc/bash_completion:83: command not found: complete /usr/local/etc/bash_completion:84: command not found: complete /usr/local/etc/bash_completion:85: command not found: complete /usr/local/etc/bash_completion:86: command not found: complete /usr/local/etc/bash_completion:87: command not found: complete /usr/local/etc/bash_completion:88: command not found: complete /usr/local/etc/bash_completion:89: command not found: complete /usr/local/etc/bash_completion:90: command not found: complete /usr/local/etc/bash_completion:91: command not found: complete /usr/local/etc/bash_completion:92: command not found: complete /usr/local/etc/bash_completion:93: command not found: complete /usr/local/etc/bash_completion:94: command not found: complete /usr/local/etc/bash_completion:95: command not found: complete /usr/local/etc/bash_completion:96: command not found: complete /usr/local/etc/bash_completion:97: command not found: complete /usr/local/etc/bash_completion:98: command not found: complete /usr/local/etc/bash_completion:99: command not found: complete /usr/local/etc/bash_completion:100: command not found: complete /usr/local/etc/bash_completion:101: command not found: complete /usr/local/etc/bash_completion:102: command not found: complete /usr/local/etc/bash_completion:103: command not found: complete /usr/local/etc/bash_completion:104: command not found: complete /usr/local/etc/bash_completion:105: command not found: complete /usr/local/etc/bash_completion:106: command not found: complete /usr/local/etc/bash_completion:107: command not found: complete /usr/local/etc/bash_completion:108: command not found: complete /usr/local/etc/bash_completion:110: command not found: complete /usr/local/etc/bash_completion:111: command not found: complete /usr/local/etc/bash_completion:112: command not found: complete /usr/local/etc/bash_completion:113: command not found: complete /usr/local/etc/bash_completion:114: command not found: complete /usr/local/etc/bash_completion:115: command not found: complete /usr/local/etc/bash_completion:116: command not found: complete /usr/local/etc/bash_completion:117: command not found: complete /usr/local/etc/bash_completion:118: command not found: complete /usr/local/etc/bash_completion:119: command not found: complete /usr/local/etc/bash_completion:120: command not found: complete /usr/local/etc/bash_completion:121: command not found: complete /usr/local/etc/bash_completion:122: command not found: complete /usr/local/etc/bash_completion:123: command not found: complete /usr/local/etc/bash_completion:124: command not found: complete /usr/local/etc/bash_completion:125: command not found: complete /usr/local/etc/bash_completion:126: command not found: complete /usr/local/etc/bash_completion:132: command not found: complete /usr/local/etc/bash_completion:135: command not found: complete /usr/local/etc/bash_completion:138: command not found: complete /usr/local/etc/bash_completion:141: command not found: complete /usr/local/etc/bash_completion:144: command not found: complete /usr/local/etc/bash_completion:147: command not found: complete /usr/local/etc/bash_completion:150: command not found: complete /usr/local/etc/bash_completion:153: command not found: complete /usr/local/etc/bash_completion:156: command not found: complete /usr/local/etc/bash_completion:159: command not found: complete /usr/local/etc/bash_completion:162: command not found: complete /usr/local/etc/bash_completion:341: parse error near
\n'`
@thib-rdr Is there any case you are in zsh
shell instead of bash
?
@iridakos Yes, I am using Oh My ZSH.
I have same problem. I'm using ZSH too.
I am also having this problem using bash.
@thib-rdr @mingrammer Sorry for the delayed response. Unfortunately, I can't test the script on MacOS' zsh any time soon. The script is only available for the bash shell on MacOS at the moment.
@EdKeith Hello, thanks for reporting. Are you on bash or zsh shell?
ZSH uses setopt not shopt an option might be https://github.com/larz258/Zshopt/blob/master/shopt
Closing due to inactivity.
I have looked into this a little.
To me, it seems like to be able to install via brew
one needs to change the structure of goto
repo.
Installation process is different in a sense that simply putting the goto.sh
to path is not enough. Because the way it's implemented right now is a set of global functions that need to be source
-d via .bash_profile
or so every time you open a terminal session.
There might be some other ways to support doing just that via brew
– I'm not sure.
I would love to try update the structure, though I'm afraid to break some other things in the process. We'll need to implement tests to avoid that.
I am using bash
on MacOs and I struggled a lot to get bash-completion
activated as well as getting goto
to work, seeing the same command not found
error. Finally, I found this solution:
. /usr/local/etc/bash-completion.d/goto.sh
So I added this line to .bashrc (or .bash_profile in my case):
[[ $PS1 && -f /usr/local/etc/bash_completion.d/goto.sh ]] && \
. /usr/local/etc/bash_completion.d/goto.sh
And now both goto
and autocompletion are working fine.
Great, @BellaTrix25336. That worked great. I'm using MacOS and zsh 😄 .
Maybe you could mention this in the repo, @iridakos 👍 ?
@BellaTrix25336 thanks! This worked for me as well.
In addition to the fix from @BellaTrix25336, a slightly cleaner fix is to add this to your bash_profile
:
source $(brew --prefix)/etc/bash_completion.d/goto.sh
Close all terminal windows, and reopen
I've tried
brew unlink goto; brew link goto
, and uninstalled and reinstalled,I've also tried
Something is still wrong with the brew package for goto on OSX