iridakos/goto

goto does not work for me on MacOS 10.15

ndsvw opened this issue ยท 14 comments

ndsvw commented

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): #36 (comment)


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

Hi @ndsvw ,

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

Thanks for the detailed feedback.

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

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 ๐Ÿ˜…

ndsvw commented

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

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?

@ndsvw Here's the pull request to Homebrew Homebrew/homebrew-core#49477

ndsvw commented
โžœ  ~ 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
โžœ  ~ 

Having the same issue here.

zsh: command not found: goto
prvn commented

Having same issue

OS: macos 10.15.6
Brew: 2.5.1
goto: 2.0.0

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?

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

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)

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

goto/install

Lines 48 to 53 in b7fda54

RC=""
if [ -f ~/.bashrc ]; then
RC="$HOME/.bashrc"
elif [ -f ~/.zshrc ]; then
RC="$HOME/.zshrc"
fi

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