1. Install clash-prop#
2. Install Wrap#
3. Install brew#
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
4. Install oh-my-zsh#
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
After installation, you need to set zsh as the default shell for the current user (so that zsh will be used when creating new commands):
chsh -s /bin/zsh
4-1. Declare highlighting#
Install using Homebrew:
brew install zsh-syntax-highlighting
After successful installation, edit the ~/.zshrc file and add the following configuration at the end:
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
4-2. Auto-completion#
Configuration steps, first clone the zsh-autosuggestions project to the specified directory:
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions
Then, edit the ~/.zshrc file and find the plugins configuration, add the zsh-autosuggestions plugin:
plugins=(git zsh-autosuggestions)
5. Install node#
First use brwe search nodejs
to view the version of node, and then choose the appropriate version to install. I am installing node@18 version.
brew install node@18
There will be a prompt after the installation is complete, follow the prompt to perform the installation:
==> Caveats
node@18 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have node@18 first in your PATH, run:
echo 'export PATH="/usr/local/opt/node@18/bin:$PATH"' >> ~/.zshrc
For compilers to find node@18 you may need to set:
export LDFLAGS="-L/usr/local/opt/node@18/lib"
export CPPFLAGS="-I/usr/local/opt/node@18/include"
==> Summary
🍺 /usr/local/Cellar/node@18/18.18.1: 2,337 files, 51.1MB
==> Running `brew cleanup node@18`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> node@18
node@18 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have node@18 first in your PATH, run:
echo 'export PATH="/usr/local/opt/node@18/bin:$PATH"' >> ~/.zshrc
For compilers to find node@18 you may need to set:
export LDFLAGS="-L/usr/local/opt/node@18/lib"
export CPPFLAGS="-I/usr/local/opt/node@18/include"
Enter the following command as prompted:
echo 'export PATH="/usr/local/opt/node@18/bin:$PATH"' >> ~/.zshrc
This article is synchronized and updated to xLog by Mix Space
The original link is https://liu-wb.com/posts/default/1