一、ble.sh配置
ble.sh可以让bash实现zsh效果的命令补全和语法高亮,官网地址:https://github.com/akinomyoga/ble.sh?tab=readme-ov-file
下面给出非安装方案,安装方案见官网地址
- clone ble.sh:
git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git
- 安装 gawk:
sudo apt install gawk
- make:
make -C ble.sh
- 写入bashrc:
echo 'source ble.sh目录位置/out/ble.sh' >> ~/.bashrc
,如放到Documents目录下echo 'source ~/Documents/ble.sh/out/ble.sh' >> ~/.bashrc
二、Oh My Bash配置
Oh My Bash类似于Oh My Zsh,有插件和主题可以安装,官网地址:https://github.com/ohmybash/oh-my-bash
注意:如果已有~/.bash_profile
文件,那么文件中需要添加如下内容:
if [[ -f ~/.bashrc ]]; then
source ~/.bashrc
fi
安装Oh My Bash:bash -c "$(wget https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh -O -)"
写入bashrc: echo 'source ble.sh目录位置/out/ble.sh' >> ~/.bashrc
,如放到Documents目录下echo 'source ~/Documents/ble.sh/out/ble.sh' >> ~/.bashrc
卸载Oh My Bash:uninstall_oh_my_bash