Skip to content

Latest commit

 

History

History
155 lines (100 loc) · 2.66 KB

File metadata and controls

155 lines (100 loc) · 2.66 KB

🍎 MAC User 📦 Install Iterm

https://iterm2.com/

📦 Install zsh

🐧 Linux User :link: https://linuxhint.com/install_zsh_shell_ubuntu_1804/

sudo apt-get install zsh

Get location of zsh

whereis zsh

Put it

sudo usermod -s (zsh location) $(whoami)

🔁 💻 Restart computer

sudo reboot

When re-starting terminal put 2 to create a default .zshrc

🍎 MAC User :link: https://sourabhbajaj.com/mac-setup/iTerm/zsh.html

brew install zsh

✔️ Check if correctly installed

zsh --version

📦 Install oh-my-zsh and replace zsh

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Run zsh-syntax-highlighting on zshrc when zsh will be run:

🐧 Linux User

echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc

🍎 MAC User

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

🔁 🔳 Restart terminal

Customize zshrc

  • Custom theme agnoster
  • source ~/.nvm/nvm.sh (install nvm before)

🚩 Optional: Allow plugin in oh-my-zsh

https://github.com/ohmyzsh/ohmyzsh/wiki/Cheatsheet Shortcut oh-my-zsh, keep it in favorite !

Powerline for better interface(with agnoster theme oh my zsh)

🐧 Linux User

sudo apt-get install powerline fonts-powerline
sudo apt-get install zsh-syntax-highlighting

🍎 MAC User

# clone
git clone https://github.com/powerline/fonts.git --depth=1

# install
cd fonts

./install.sh

# clean-up a bit
cd ..

rm -rf fonts

Open iTerm2->Preferences->Profiles->Change Font-> Meslo LG S DZ Regular for Powerline

Bonus

mkdir + cd COMMAND

mkcdir () { mkdir -p -- "$1" && cd -P -- "$1" }

And don't forget to source ~/.zshrc

Add Other Font

brew tap homebrew/cask-fonts

brew install font-fira-code-nerd-font

Open iTerm2->Preferences->Profiles->Change Font-> Nerd font

Add Keymapping

https://stackoverflow.com/questions/6205157/how-to-set-keyboard-shortcuts-to-jump-to-beginning-end-of-line

Check the section bellow:

Open Preferences
Click "Profile" tab
Select a profile in the list on the left (eg "Default")
Click "Keys" tab
Click "Key Mappings" tab (if it exists)
Click the "Presets" dropdown and select "Natural Text Editing"

Set by default

chsh -s $(which zsh)

echo $SHELL // check if /bin/zsh 

zsh use login shell by default