做外貿自己的公司網(wǎng)站成品app直播源碼有什么用
文章目錄
- 一、安裝zsh、git、wget
- 二、安裝運行腳本
- 1、curl/wget下載
- 2、手動下載
- 三、切換主題
- 1、編輯配置文件
- 2、切換主題
- 四、安裝插件
- 1、zsh-syntax-highlighting(高亮語法錯誤)
- 2、zsh-autosuggestions(自動補全)
- 五、更多優(yōu)化配置
一、安裝zsh、git、wget
安裝
oh-my-zsh
的前提需要先安裝zsh
并且版本至少為 4.3.9。推薦使用 5.0.8 或更新版本
yum install -y wget git zsh
二、安裝運行腳本
oh-my-zsh官網(wǎng):https://ohmyzsh.sh/#insatll
1、curl/wget下載
-
使用curl:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
-
使用wget:
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
2、手動下載
GitHub:https://github.com/ohmyzsh/ohmyzsh
Gitee:https://gitee.com/mirrors/oh-my-zsh/
-
手動
Download Zip
-
下載好的壓縮包上傳到虛擬機/遠程連接工具
-
#解壓 yum install -y unzip unzip oh-my-zsh-master.zip
-
#運行腳本 cd oh-my-zsh-master/tools ./install.sh
手動輸入y即可體驗
三、切換主題
1、編輯配置文件
編輯
zsh
配置文件~/.zshrc
vim ~/.zshrc
2、切換主題
找到 ZSH_THEME=“” 行
后面引號中即為主題名稱
許多主題需要安裝 Powerline 字體或 Nerd 字體才能正確渲染。
沒有它們,這些主題將渲染出奇怪的提示符號
/oh-my-zsh-master/themes
下是可供選擇的主題
- 也可以使用
ZSH_THEME="random"
使用隨機主題 - 隨機主題下可以使用
source ~/.zshrc
重載配置文件來刷新主題 - 選出一個合適的主題后 可以使用命令
echo $RANDOM_THEME
來輸出當前的主題名稱
四、安裝插件
1、zsh-syntax-highlighting(高亮語法錯誤)
官網(wǎng):https://github.com/zsh-users/zsh-syntax-highlighting
下載插件到本地指定目錄
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
設置插件自動加載
echo "source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
重載配置文件
source ~/.zshrc
2、zsh-autosuggestions(自動補全)
官網(wǎng):https://github.com/zsh-users/zsh-autosuggestions
下載插件到本地指定目錄
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
設置插件自動加載
echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
重載配置文件
source ~/.zshrc
五、更多優(yōu)化配置
這篇 iTerm2 + Oh My Zsh 教程手把手讓你成為這條街最靚的仔-騰訊云開發(fā)者社區(qū)-騰訊云 (tencent.com)