oh-my-zsh === ###### tags: `bash` :::info [README](https://github.com/robbyrussell/oh-my-zsh.git) ::: * 先更新 ```shell= $sudo apt-get update $sudo apt-get upgrade ``` * 基本安裝 ```shell= $ sudo apt install git-core zsh -y ``` * 查看你的shell ```shell= cat /etc/shells ```  接者要安裝oh-my-zsh ```shell= # via curl $sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" # via wget $sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" -Y ``` * 切換shell ```shell= $ chsh -s /bin/zsh ``` * 再來就是要設定我們自己喜歡的主題啦,可以從官方提供的各式主題中自己挑選喜歡的主題使用,但就要自行安裝各主題所需要的套件 # [官方主題庫](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes) ```shell= #改這行 ZSH_THEME="robbyrussell" #換成 ZSH_THEME="agnoster" ```  ## 安裝 Powerline * 自動安裝 ```shell= sudo apt-get install powerline ``` ## zsh-syntax-highlighting 另一個很棒的插件是shell的語法高亮。除此之外,此插件還能夠驗證命令的正確性 ```shell= # 安装 cd /home/shellhub/.oh-my-zsh/custom/plugins git clone https://github.com/zsh-users/zsh-syntax-highlighting # 添加到.zshrc配置文件中的plugins中 vim ~/.zshrc # 例子 plugins=( git colored-man-pages zsh-syntax-highlighting zsh-autosuggestions ) ``` ## zsh-autosuggestions 您還可以使用zsh-autosuggestions來完成命令。它根據您的命令歷史記錄建議命令。很有用!要選擇建議的命令,請按向右箭頭鍵。 ```shell= #安裝方式和zsh-syntax-highlighting一樣 $ git clone https://github.com/zsh-users/zsh-autosuggestions #然後添加zsh-syntax-highlighting到插件列表中( vim ~/.zshrc) ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up