I've attempted to uninstall and reinstall RVM, in attempts to make a systemwide Ruby and gemset, but it didn't work out as well as I had hoped. I uninstalled RVM, but when I run a command that is not found, it tells me
-bash: unknown_command: command not found
rather than
bash: unknown_command: command not found
What happened, and how can I fix this? I want it to just say bash: and not -bash:.
EDIT: I tried a couple things, and ran bash -login. After running this, I only got bash: but after I logged out of this new login shell, I got -bash: again.
the minus has to stand for login shell, it's perfectly fine to get -bash:.
more troubling is that there is no command not found try:
command_not_found_handle(){ echo "Command not found: $*"; return 127; }
Related
Chances are that you might be getting the following error on your Mac, when you have been trying to run commands in the terminal
and you have already installed the commands
zsh: command not found: git
or
zsh: command not found: curl
The fix is in the answer below
Chances are that something might have gone wrong with the users $PATH on your machine or maybe the actual path where the command is has not been set.
You can just run the command below, this should fix you issue:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
and if you feel like checking the path you can just run :
echo $PATH
Since I installed python to my Mac, I have a lot of trouble with zsh. By typing in something to the Terminal, I always get:
zsh: command not found: {whatever I've typed}
Currently, my only way to get through that is to type:
bash
and changing to bash profile.
The thing is, that I now wanted to learn about zsh. But I can't, because I don't even get into typing zsh commands.
Thank you for helping me!
After I attempted to uninstall oh-my-zsh, I am getting the error
/Users/Thomas/.zshrc:source:56: no such file or directory: /Users/Thomas/.oh-my-zsh/oh-my-zsh.sh
This issue indicates that the original shell needs to be reverted back to, however the provided command
chsh -s /bin/bash
is not working. I've restarted my iTerm as well. And my aliases still don't work, as well as exported variables such as $JAVA_HOME return empty, even though they are properly set using my former .bash_profile. Also rather than ending with a ~ my terminal prompt ends with a %
Thomas%
How can I revert?
One detail, when I attempted the uninstall via uninstall_oh_my_zsh I mistyped my password. Rather than prompting me again, it looked as though it went ahead and completed the uninstall, but maybe some component of it didn't complete properly.
Make sure you have Brew installed.
Enter brew remove zsh into the terminal then reset your terminal, it should reconfigure back to your original shell.
For this kind of error, you need to check if you set the default bash to zsh in .bashrc file. So, if there is any, just comment them out.
Example for mine.
#Launch Zsh
if [ -t 1 ]; then
exec zsh
fi
So, you just need to comment that out.
#Launch Zsh
#if [ -t 1 ]; then
#exec zsh
#fi
I was trying to setup home-brew and git(installed) via terminal . After i failed to install home-brew i tried to fix the errors that appeared and terminal entered bash and doesn't accept my commands . I tried quitting the terminal app or exit,logout, restart system etc.
Savvass-MacBook-Pro-2:~ Solen$ clear
-bash: clear: command not found
Savvass-MacBook-Pro-2:~ Solen$
SO your path seems to be wrong. You have to fix it :
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
Then export it :
export PATH;
And that should be enough
I recently updated some applications and now it is giving me error when I open any new tab in teminal.
Error it is giving:
/Users/priti/.oh-my-zsh/lib/completion.zsh:28: command not found:
whoami /Users/priti/.oh-my-zsh/lib/theme-and-appearance.zsh:10:
command not found: uname
/Users/priti/.oh-my-zsh/lib/theme-and-appearance.zsh:14: command not
found: uname getent:4: command not found: grep
I am sure something is wrong with the updated zshrc file, but I am not able to figure out what exactly the problem in that.
Problems I have faced till now are vi and grepcommand not working.For both output is command not found.
Thanks in advance for the same.
Reinstalling zsh solved the problem.
Some steps I followed after brew update might have caused this problem.