Oh My Bash
Oh My Bash
安装
(可选) 备份 .bashrc
文件
cp ~/.bashrc ~/.bashrc.orig
下载
创建新的配置文件
cp ~/.oh-my-bash/templates/bashrc.osh-template ~/.bashrc.osh
echo 'if [ -e ~/.bashrc.osh ]; then source ~/.bashrc.osh; fi' >> ~/.bashrc
chmod 755 ~/.oh-my-bash
(可选) 修改主题
sed -i 's/OSH_THEME=".*"/OSH_THEME="tonotdo"/g' ~/.bashrc.osh
重新加载 .bashrc
source ~/.bashrc
(可选) 修改文件及目录权限
chmod 644 ~/.bashrc ~/.bashrc.osh ~/.osh-update
chmod 600 ~/.sdirs
管理
更新
upgrade_oh_my_bash
卸载
uninstall_oh_my_bash
插件
要启用插件,只需将其添加到 ~/.bashrc.osh
中的 plugins
数组中即可。例如,要启用 git
插件:
plugins=(git)
然后重新加载您的配置文件:
source ~/.bashrc
主题
单行主题
font
11:07:44 computer@AMD-5800X sample ±|main|→
standard
computer@AMD-5800X:~/source/sample$
tonotdo
computer@AMD-5800X ~/source/sample main ✓ >
vscode
双行主题
90210
[11:18 上午]-[computer@AMD-5800X]-[~/source/sample]- |main ✓|
$
bakke
AMD-5800X: ~/source/sample |main ✓|
→
edsonarios
⚡ 11:06:18 /home/computer/source/sample/ (main)
❯_
luan
11:10:56 computer@AMD-5800X:~/source/sample (main ✓)
▶ $
minimal-gh
11:12:31am computer /home/computer/source/sample - main ✓
$