Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goto does not work for me on MacOS 10.15 #55

Open
ndsvw opened this issue Nov 14, 2019 · 14 comments
Open

goto does not work for me on MacOS 10.15 #55

ndsvw opened this issue Nov 14, 2019 · 14 comments
Labels
help wanted 🙏 Extra attention is needed

Comments

@ndsvw
Copy link

ndsvw commented Nov 14, 2019

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

@iridakos
Copy link
Owner

Hi @ndsvw ,

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

Thanks for the detailed feedback.

@bluespore
Copy link

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

@mjwwit
Copy link

mjwwit commented Jan 8, 2020

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
Copy link
Author

ndsvw commented Jan 27, 2020

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

@iridakos
Copy link
Owner

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
Copy link
Owner

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

@iridakos iridakos added the help wanted 🙏 Extra attention is needed label Jan 28, 2020
@ndsvw
Copy link
Author

ndsvw commented Jan 28, 2020

➜  ~ 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
➜  ~ 

@juliofalbo
Copy link

Having the same issue here.

zsh: command not found: goto

@prvn
Copy link

prvn commented Sep 17, 2020

Having same issue

OS: macos 10.15.6
Brew: 2.5.1
goto: 2.0.0

@trifygri
Copy link

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?

@dcchambers
Copy link

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

@davidgourde
Copy link

davidgourde commented Mar 16, 2022

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)

@silent-tan
Copy link

silent-tan commented Apr 2, 2024

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

@alperenkilic
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted 🙏 Extra attention is needed
Projects
None yet
Development

No branches or pull requests