Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, themes, and a few things that make you shout….
“Oh My ZSH!”
Installation
Oh My ZSH is installed by running one of the following commands in your terminal. You can install this via the command-line with either curl or wget.
Curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Wget
sh -c “$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)”
If you are on a fresh installation of mac, then it will install some terminal tools. If your in other OS it may need some other dependency as well
Themes and Plugins
OMZ [Oh-My-ZSH] supports many themes and plugins. These can be installed, set and used by the following commands.
omz theme set|use <theme name>
Example
omz theme set gnzh
omz theme use gnzh
Alias
OMZ allow setting of alliases in the zsh config file [.zshrc] itself. You can open the .zshrc file which is in the home folder and then go to the alias part and then add a alias you want. If the alias part does not exist then you can simply add it in the end of the file.
# Custom made Alias.
alias curlx=”curl -XGET -IL”
and then save it. You may need to restart your shell [sometimes logout and login or restart the system]
Plugins
Now we can move to installing plugins, another interesting thing by omz.
To do so
omz plugin load <plugin name>
and then
omz enable <plugin name>
will do the job.
Example
omz plugin load tmux
omz plugin enable tmux
You need to have tmux installed for this to work.
Customizing Tmux
Tmux allow multiple customization. We shall customise the default key binding of the tmux from Ctrl + B
to Ctrl + r
To do it.
nano ~/.tmux.conf
# Change the prefix key to C-a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
Save and relaunch terminal and tmux
Leave a Reply
You must be logged in to post a comment.