1.公司的网站一般不让直接clone git上的源码,可以去git网站下载 zip文件GitHub - ohmybash/oh-my-bash: A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
2.unzip解压
3.
-
将解压后的文件移动到
.oh-my-bash
目录:bash复制代码
mv ~/oh-my-bash-master ~/.oh-my-bash
-
运行安装脚本:
bash复制代码
~/.oh-my-bash/tools/install.sh
-
配置 Bash:安装脚本会自动修改你的
~/.bashrc
文件。如果没有,你可以手动添加以下内容到~/.bashrc
文件中:bash复制代码
export OSH=~/.oh-my-bash
source $OSH/oh-my-bash.sh
-
应用配置:重新加载 Bash 配置文件,或者重新打开一个终端窗口。
bash复制代码
source ~/.bashrc
-
选择主题和插件:
- 主题:编辑
~/.bashrc
文件,找到OSH_THEME
变量并设置你喜欢的主题。例如:bash复制代码
OSH_THEME="agnoster"
- 插件:在
~/.bashrc
文件中找到plugins
变量,并添加你需要的插件。例如:bash复制代码
plugins=(git bash-completion)
- 主题:编辑
完成以上步骤后,你的 Oh My Bash 应该已经成功安装并配置好了。