Zsh #
Warning: This post hasn't been updated for over a year. The information may be out of date.
My notes on Unix/shell basics from ages ago (in Chinese): notes: bash
Set Language #
Set everything to English:
# In .zshrc
export LANG=en_US.UTF-8…except git: (credit)
# In .zshrc
alias git='LANG="zh_CN.UTF-8" git'Custom motd (message of the day) #
Blog post: macOS + zsh 上使用 Neofetch 作为欢迎语(MotD)
In shell:
brew install macchina
cd ~
touch motd.shIn ~/motd.sh:
#! /usr/bin/env zsh
macchina --theme HeliumIn ~/.zshrc:
# display motd
if [[ -e $HOME/motd.sh ]]; then source $HOME/motd.sh; fiPrint All Colours #
for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done
# or
for i in {0..255}; do printf "\x1b[38;5;${i}mcolour${i}\x1b[0m\n"; doneAntigen #
Repository: zsh-users/antigen: The plugin manager for zsh.
Note: The antigen bundle <<EOBUNDLES EOBUNDLES thing does not work. Add each plugin line-by-line.