goto: OSX doesn't install to path

brew install goto

Close all terminal windows, and reopen

goto
-bash: goto: command not found

I’ve tried brew unlink goto; brew link goto, and uninstalled and reinstalled,

ll /usr/local/Cellar/goto/1.2.3/etc/bash_completion.d/goto.sh
-rw-r--r--  1 sowen  admin  11402 Mar 14 13:47 /usr/local/Cellar/goto/1.2.3/etc/bash_completion.d/goto.sh

I’ve also tried

chmod +x /usr/local/Cellar/goto/1.2.3/etc/bash_completion.d/goto.sh

Something is still wrong with the brew package for goto on OSX

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 4
  • Comments: 19 (8 by maintainers)

Commits related to this issue

Most upvoted comments

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.

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

@BellaTrix25336 thanks! This worked for me as well.

Great, @BellaTrix25336. That worked great. I’m using MacOS and zsh 😄 .

Maybe you could mention this in the repo, @iridakos 👍 ?