At macOS Catalina ver: 10.15.3, i modified the ~/.zshrc file and worked for me for the default terminal (zsh). I had created the ~/.bash_profile file and nothing changed. Share
In macOS 10.15 or beyond (Catalina, Big Sur, Monterey), you need to edit the .zshrc file instead of the .bashrc or .bash_profile file. In the process, you may face a big problem: you cannot find the .bashrc file on your Mac.
The issue here is that you have copied the file from somewhere and it has altered line endings. Probably by using an editor that wraps lines to a fixed side or that the original web site did not expand the text enough.
There are multiple solutions to this, and you can find more information here if you are interested. Add the following to your .zshrc or .zsh_profile. # Load version control information autoload -Uz vcs_info precmd () { vcs_info } # Format the vcs_info_msg_0_ variable zstyle ':vcs_info:git:*' formats '%b' # Set up the prompt (with git branch
2 Answers Sorted by: Reset to default This answer is useful 17 This answer is not useful Save this answer. Show activity on this post. To know which shell are you using, use the following command: $ echo $SHELL
1 Answer. You're not using ZSH, if you were, you'd get zsh: command not found: expo. You could either switch to using zsh using chsh or keep using Bash. Then you should add the PATH modifications (export PATH ) to the appropriate shell config file .bash_profile or .zshenv, by running sudo vim ~/.bash_profile or sudo vim ~/.zshenv, or if you
h8TOm4. Reloading the .zshrc. We can reload a .zshrc file without closing the current terminal by using the following shell command. . ~/.zshrc. or we can also use the source command to reload it. source ~/.zshrc. hours of video content. Learn, how to reload your file after making the changes to it.
I find zprofile set the environment for login shells while zshrc sets the environment for interactive shells. However, I cannot really see differences between two methods on macOS terminal since each terminal tab is a login session on macOS by default.
Specific to many users who only experience the brew command not found problem after installing the popular Oh-my-zsh package, you may try manually adding the following line to your .zshrc file: eval $(/opt/homebrew/bin/brew shellenv) You can also add this to your zshrc with a single command: echo "eval $(/opt/homebrew/bin/brew shellenv
then startup loads in a file called .zshrc.personal where I have all of my config. If I put two statements in there: echo "hello" alias home="cd ~/" and then source or restart my shell, I see the echo statement, but the alias doesn't work. I'm guessing there's some sort of conflict with the default mac version of zsh, but I don't know how to
which is strange it says "no such file or directory" then gives what looks like would be the contents of such a file. I need to add a PATH so was following along to a video that said to cd to ~ and ls -la to show hidden files and open up the .bash_profile and that is where all the paths are and i could add one. However it seems I now run zsh.
how to find zshrc file in mac