1.用 brew 安装 fortune
2.安装语言库
| 1
 | $ git clone git@github.com:ruanyf/fortunes.git
 | 
3. 生成索引文件
| 12
 3
 4
 
 | $ strfile fortunes/data/fortunes$ strfile fortunes/data/chinese
 $ strfile fortunes/data/tang300
 $ strfile fortunes/data/song100
 
 | 
4. 编辑 ~/.zshrc
那么每次启动 shell 窗口,就会自动跳出一句格言。
| 12
 3
 4
 5
 6
 7
 
 | echoecho "=============== Quote Of The Day ==============="
 echo
 fortune 25% fortunes/data/fortunes 25% fortunes/data/chinese 25% fortunes/data/tang300 25% fortunes/data/song100
 echo
 echo "================================================"
 echo
 
 | 
5. 制作语言包
参考