Linux 現在預設都是使用 Bash,想要有類似 zsh + fish 可以按 Tab 選資料夾的功能,可以搭配 BLE.sh 來達成
Linux Bash 安裝 BLE.sh
- BLE (Bash Line Editor) Github 官網:
初始環境安裝
- sudo apt install make gawk # make ble.sh 需要 gawk
BLE.sh 測試使用
- git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git # or git clone --recursive https://github.com/akinomyoga/ble.sh.git
- make -C ble.sh
- source ble.sh/out/ble.sh
BLE.sh 安裝步驟 (安裝在自己資料夾)
- git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git
- make -C ble.sh install PREFIX=~/.local
- echo 'source ~/.local/share/blesh/ble.sh' >> ~/.bashrc
- source ~/.bashrc
blerc:BLE.sh 修改顏色
- vim ~/.blerc # blerc Template
- bleopt color_scheme=catppuccin_mocha
- # bleopt color_scheme=default
- # bleopt color_scheme=base16
- Theme 挑選:https://github.com/akinomyoga/blesh-contrib/tree/master/scheme (目前也只有三個 default、base16、catppuccin_mocha)
- # ble-face --set background '#000000' --set foregound '#ffffff' # 指定顏色
BLE 升級
- ble-update
- 或者 bash ~/.local/share/blesh/ble.sh --update
BLE uninstall
- 移除 .bashrc 這行
- source ~/.local/share/blesh/ble.sh
- 移除 ~/.blerc 或 ~/.config/blesh/init.sh
- 移除 ~/.local/state/blesh
- 到當初安裝 ble.sh 的地方:make -C ble.sh uninstall
BLE 問題排除
- 遇到
ble.sh: unrecognized argument 'nobeep'
ble.sh: cancel initialization.
要怎麼處理- vim ~/.bashrc # 找到 set nobeep,將這行註解掉即可