goto icon indicating copy to clipboard operation
goto copied to clipboard

goto does not work for me on MacOS 10.15

Open ndsvw opened this issue 5 years ago • 14 comments

I can install goto without having any problems via brew but it won't start.

brew install goto

/usr/local/Cellar/goto/1.2.3: 6 files, 18.9KB, built in 4 seconds

If I try starting it: goto

zsh: command not found: goto

With MacOs 10.15, Apple changed the default shell on MacOS to zsh. Maybe that's the problem..

I tried solving this issue by doing this (without success): https://github.com/iridakos/goto/issues/36#issuecomment-496945108


OS: MacOS 10.15.1 Shell: zsh (default shell) goto Version: 1.2.3 (newest version I get via brew install goto) never had such a problem with any brew package

ndsvw avatar Nov 14 '19 18:11 ndsvw

Hi @ndsvw ,

I will try to to the same asap in my mac and let you know.

Thanks for the detailed feedback.

iridakos avatar Nov 15 '19 16:11 iridakos

Reporting that I had the same issue, and I understand this doesn't help the install with brew, but I did have success simply using the manual method FWIW. So you can use it that way in the meantime @ndsvw

bluespore avatar Jan 08 '20 03:01 bluespore

I just ran into this issue, and it appears that the actual binary is not part the things installed; /usr/local/Cellar/goto/1.2.3 does not contain a binary. -- EDIT -- Of course by binary I mean the shell script 😅

mjwwit avatar Jan 08 '20 07:01 mjwwit

@iridakos, can you update the brew-version of goto? The lastest version of goto on brew is 1.2.3 (from 14 Mar 2018).

ndsvw avatar Jan 27 '20 21:01 ndsvw

Hi @ndsvw ,

I created a release and I will try to update the version in Brew as well. Unfortunately I no longer have access to a MacOS system and I can't test if the functionality is working on ZSH there. Do you have any updates on this?

iridakos avatar Jan 28 '20 08:01 iridakos

@ndsvw Here's the pull request to Homebrew https://github.com/Homebrew/homebrew-core/pull/49477

iridakos avatar Jan 28 '20 09:01 iridakos

➜  ~ brew upgrade goto
==> Upgrading 1 outdated package:
goto 1.2.3 -> 2.0.0
==> Upgrading goto 
==> Downloading https://github.com/iridakos/goto/archive/v2.0.0.tar.gz
==> Downloading from https://codeload.github.com/iridakos/goto/tar.gz/v2.0.0
######################################################################## 100.0%
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/goto/2.0.0: 6 files, 20.8KB, built in 10 seconds
Removing: /usr/local/Cellar/goto/1.2.3... (6 files, 18.9KB)
Removing: /Users/-/Library/Caches/Homebrew/goto--1.2.3.tar.gz... (667KB)
==> Checking for dependents of upgraded formulae...
==> No dependents found!
➜  ~ 

but still:

➜  ~ goto
zsh: command not found: goto
➜  ~ 

ndsvw avatar Jan 28 '20 20:01 ndsvw

Having the same issue here.

zsh: command not found: goto

juliofalbo avatar Jun 16 '20 08:06 juliofalbo

Having same issue

OS: macos 10.15.6 Brew: 2.5.1 goto: 2.0.0

prvn avatar Sep 17 '20 03:09 prvn

This solved it for me:

add this to your ~./zshrc file and source it or start a new terminal session

autoload bashcompinit
bashcompinit
source /usr/local/etc/bash_completion.d/goto.sh

goto <tab>

showed all my previously defined aliases

but trying to call them errored

goto mydir
goto error: unregistered alias mydir

I had to reregister my aliases with

goto -r <alias> <directory>

and this solved it.

helpful link Can a Bash tab-completion script be used in zsh?

trifygri avatar Oct 23 '20 17:10 trifygri

If you're still using bash with MacOS instead of zsh and are encountering this error, you can add this to your .bash_profile to fix this error:

source $(brew --prefix)/etc/bash_completion.d/goto.sh

dcchambers avatar Mar 18 '21 14:03 dcchambers

I can source goto.sh to have the script works, but I cannot get the auto-completion work at all. When I press after writing "goto ", I get the auto-completion of the current folder's files instead... I tried all the solutions listed here. 😭

Note: The same .zshrc lines works on my Windows + WSL machine, but not on my MacOS (Monterey)

davidgourde avatar Mar 16 '22 18:03 davidgourde

hope this can help u if u install goto via script : )

check if following code in your ~/.zshrc, and append it if not

# Source goto
[[ -s "/usr/local/share/goto.sh" ]] && source /usr/local/share/goto.sh

the reason it not work maybe you have both .bashrc and .zshrc

https://github.com/iridakos/goto/blob/b7fda54e0817b9cb47e22a78bd00b4571011cf58/install#L48-L53

silent-tan avatar Apr 02 '24 16:04 silent-tan

Copy the file goto.sh somewhere in your filesystem and add a line in your .zshrc or .bashrc to source it.

For example, if you placed the file in your home folder, all you have to do is add the following line to your .zshrc or .bashrc file: source ~/goto.sh

download goto.sh

it fixed my problem Screenshot 2024-04-10 at 01 40 19

alperenkilic avatar Apr 09 '24 22:04 alperenkilic