The Switch from Bash to Zsh
After resisting for several years, I finally decided make the switch from Bash to Zsh. One of the primary drivers was the visual aspects of the shell that I always saw in screenshots posted by others on the internet. But also I want to expand my mind and learn a new shell. I used the tutorial here to get myself started.
sudo apt update
sudo apt install zsh
sudo usermod -s /usr/bin/zsh $(whoami)
sudo reboot
Once the system has rebooted, [ctrl]+[alt]+[t] to open a new terminal window. I selected option ‘0’. I then installed the powerline plugins for Zsh:
sudo apt install powerline fonts-powerline
I opened a new terminal window and verified the results. I then installed the powerlevel9k theme (I later found out this is no longer maintained):
sudo apt install zsh-theme-powerlevel9k
Continuing with the instructions, I installed the syntax highlighting plugin:
sudo apt install zsh-syntax-highlighting
I stopped at the steps for installing the additional plugins for Zsh and Git integration, as I feel I did not need them at this time. However, I needed to make a few more additions for get Zsh just right for me. Using Google search, I researched how to modify the .zshrc file to enable case-insensitive tab completion and ensure the tab-complete selects the first result, file and directory coloring with the list command, a function to setup the ARM GCC toolchain on the PATH, and an alias to point to the latest Python on the system. The following is a view of my current zshrc file:
# Created by newuser for 5.8
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
setopt MENU_COMPLETE
source /usr/share/powerlevel9k/powerlevel9k.zsh-theme
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
function Setup_Gcc_Arm_Toolchain() {
export PATH=$PATH:/home/bdn/Programming/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf/bin
}
alias ls='ls --color=auto'
source /usr/share/powerlevel9k/powerlevel9k.zsh-theme
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
HISTFILE=~/.histfile
HISTSIZE=100000000
SAVEHIST=100000000
setopt appendhistory #Append history to the history file (no overwriting)
setopt sharehistory #Share history across terminals
setopt incappendhistory #Immediately append to the history file, not just when a term is killed
alias python='/usr/bin/python3'
export PATH=$PATH:/home/bdn/Programming/capnproto_amd64/bin