Reputation: 25369
I have noticed some problems lately on my git and I want to uninstall it, when I try to identify the path with:
which git
I always get the following error:
zsh: bad option: -l
any ideas what this error might be indicating?
I have tried on iterm and on default terminal but get always the same error.
Upvotes: 3
Views: 3010
Reputation: 323
Also had this issue. I found using the command whereis
in place of which
seemed to work just as well for me.
Based on this answer.
Upvotes: 0
Reputation: 259
In my case, I was having trouble getting sdkman to work and seeing this:
danbitter@Dans-MBP ~ % source "/Users/danbitter/.sdkman/bin/sdkman-init.sh"
find: -type: open: unknown type
/Users/danbitter/.sdkman/bin/sdkman-init.sh:83: parse error near `-a'
Thanks to @marc0der & @helpermethod, the issue was in my .zshrc file:
alias -g f='open -a Finder ./' # f: Opens current directory in MacOS Finder
This is super weird because disabling that line in the .zshrc file allows sdkman to function in the zsh shell.
But, I can then paste the actual command open -a Finder ./
in that same zsh shell and it opens a Finder in the working directory? Color me confused ¯\(ツ)/¯
edit: I changed it from an alias -g
to a function f() {open .;}
and now my .zshrc works happily alongside sdkman :-)
Upvotes: 0
Reputation: 4787
Check if your .bashrc
or .bash_profile
(maybe .zshrc
) has an alias on which command.
Upvotes: 5