BASH-IT : BASH FRAMEWORK TO MAKE YOUR TERMINAL COOL
on
Get link
Facebook
X
Pinterest
Email
Other Apps
Brief: Bash-it is a community driven Bash framework for maintaining various shell scripts, custom commands, aliases & more and make you terminal look & act way cooler.
We all use the terminal, more or less, regardless of which Linux distribution we use. But have you ever thought the default appearance to be a little mundane? Or ever wished for having a bit more control over your terminal workflow? Today I’m going to show you the way to crank up your terminal experience.
Note: This article is intended for at least intermediate level Linux users who would know their way around Shell and its configuration. Beginners may try it at their own risk.
WHAT’S UNDERNEATH THE TERMINAL?
The terminal or terminal emulator is just an interface for interacting with the shell. Now, in simple words, shell (or command-line interpreter) is a program that we use to interact the underlying system by entering commands.
There are many different shells for Linux. But, most of the popular Linux distributions come with Bash as their default shell. So, odds are really high that you are using Bash in your terminal.
For checking if you are using Bash, run the following command and see if you see YES:
Now that you know if you are using Bash, let’s dive into the main topic.
BASH-IT
Bash-it is a Bash framework for using, developing and maintaining various shell scripts, custom commands, aliases and more. It is a community driven project on GitHub. So, everything you find in it is used & tested by thousands of people and developed by many contributors.
ALIASES
Bash-it comes with a huge collection of aliases used by the community. Currently, 32 alias scripts are available. You can enable/disable them by:
bash-it enable alias apt
bash-it disable alias git
COMPLETION
Typing the whole command every single time is painful. Most of the command-line tools on Linux enables completion while installing them. So, that if you write first two or three letters on the terminal and hit TAB, it is auto-completed.
BASH-IT : BASH FRAMEWORK TO MAKE YOUR TERMINAL COOL
Brief: Bash-it is a community driven Bash framework for maintaining various shell scripts, custom commands, aliases & more and make you terminal look & act way cooler.
We all use the terminal, more or less, regardless of which Linux distribution we use. But have you ever thought the default appearance to be a little mundane? Or ever wished for having a bit more control over your terminal workflow? Today I’m going to show you the way to crank up your terminal experience.
Note: This article is intended for at least intermediate level Linux users who would know their way around Shell and its configuration. Beginners may try it at their own risk.
The terminal or terminal emulator is just an interface for interacting with the shell. Now, in simple words, shell (or command-line interpreter) is a program that we use to interact the underlying system by entering commands.
There are many different shells for Linux. But, most of the popular Linux distributions come with Bash as their default shell. So, odds are really high that you are using Bash in your terminal.
For checking if you are using Bash, run the following command and see if you see YES:
[ -n "$(echo $BASH)" ] && echo YES || echo NO
Now that you know if you are using Bash, let’s dive into the main topic.
BASH-IT
Bash-it is a Bash framework for using, developing and maintaining various shell scripts, custom commands, aliases and more. It is a community driven project on GitHub. So, everything you find in it is used & tested by thousands of people and developed by many contributors.
ALIASES
Bash-it comes with a huge collection of aliases used by the community. Currently, 32 alias scripts are available. You can enable/disable them by:
bash-it enable alias apt
bash-it disable alias git
COMPLETION
Typing the whole command every single time is painful. Most of the command-line tools on Linux enables completion while installing them. So, that if you write first two or three letters on the terminal and hit TAB, it is auto-completed.
But not all of them have it enabled. For many command-line tools, the completion scripts are written by the community developers rather than the official source.
Bash-it has a collection of those and it gives you an easy way for enabling/disabling them:
You should enable system completion for loading completion scripts provided by the system and bash-it for bash-it command completion.
Bash-it comes with a bunch of plugins for various tools and purposes. Currently, there is 60 plugins available. Generally plugins may contain:
Helper functions for performing various complex tasks easily. E.g.: extract, git, rails, ssh etc.
Initialization & configuration scripts that prepare tools to be ready to use.
E.g.: fasd, go, node, nvm, rbenv etc.
Dependencies for other parts of bash-it. E.g.: alias-completion, base, battery etc.
The alias-completion plugin is needed to be enabled for the completion scripts to work properly. Also, you should enable the base plugin as some other plugins depend on it. The commands for enabling/disabling plugins are similar to what we saw before.
THEMES
This is the cool part. Bash-it currently has 57 themes for you Bash prompt. Here’s how the Ubuntu vanilla Bash prompt looks like:
BASH-IT : BASH FRAMEWORK TO MAKE YOUR TERMINAL COOL
Brief: Bash-it is a community driven Bash framework for maintaining various shell scripts, custom commands, aliases & more and make you terminal look & act way cooler.
We all use the terminal, more or less, regardless of which Linux distribution we use. But have you ever thought the default appearance to be a little mundane? Or ever wished for having a bit more control over your terminal workflow? Today I’m going to show you the way to crank up your terminal experience.
Note: This article is intended for at least intermediate level Linux users who would know their way around Shell and its configuration. Beginners may try it at their own risk
WHAT’S UNDERNEATH THE TERMINAL?
The terminal or terminal emulator is just an interface for interacting with the shell. Now, in simple words, shell (or command-line interpreter) is a program that we use to interact the underlying system by entering commands.
There are many different shells for Linux. But, most of the popular Linux distributions come with Bash as their default shell. So, odds are really high that you are using Bash in your terminal.
For checking if you are using Bash, run the following command and see if you see YES:
[ -n "$(echo $BASH)" ] && echo YES || echo NO
Now that you know if you are using Bash, let’s dive into the main topic.
BASH-IT
Bash-it is a Bash framework for using, developing and maintaining various shell scripts, custom commands, aliases and more. It is a community driven project on GitHub. So, everything you find in it is used & tested by thousands of people and developed by many contributors.
ALIASES
Bash-it comes with a huge collection of aliases used by the community. Currently, 32 alias scripts are available. You can enable/disable them by:
bash-it enable alias apt
bash-it disable alias git
COMPLETION
Typing the whole command every single time is painful. Most of the command-line tools on Linux enables completion while installing them. So, that if you write first two or three letters on the terminal and hit TAB, it is auto-completed.
But not all of them have it enabled. For many command-line tools, the completion scripts are written by the community developers rather than the official source.
Bash-it has a collection of those and it gives you an easy way for enabling/disabling them:
Bash-it comes with a bunch of plugins for various tools and purposes. Currently, there is 60 plugins available. Generally plugins may contain:
Helper functions for performing various complex tasks easily. E.g.: extract, git, rails, ssh etc.
Initialization & configuration scripts that prepare tools to be ready to use. E.g.: fasd, go, node, nvm, rbenv etc.
Dependencies for other parts of bash-it. E.g.: alias-completion, base, battery etc.
The alias-completion plugin is needed to be enabled for the completion scripts to work properly. Also, you should enable the base plugin as some other plugins depend on it. The commands for enabling/disabling plugins are similar to what we saw before.
THEMES
This is the cool part. Bash-it currently has 57 themes for you Bash prompt. Here’s how the Ubuntu vanilla Bash prompt looks like:
Terminal without Bash-it
And this is how it looks like with Bash-it theme:
Terminal with Bash-it & Brainy theme
Bash-it themes can show various useful information in your prompt, like:
Git repository and other version control system information
Python and Ruby version
Time, battery information and so on!
Cool, isn’t it? For setting a theme, you have to set the value of BASH_IT_THEMEvariable in your “.bashrc” file like this:
Setting Bash-it theme
CUSTOM SCRIPTS & THEMES
If you want to load your own custom scripts with Bash-it, simply put the scripts in the “./custom/” directory inside bash-it folder. Bash-it will load every file that ends with “.bash” in their filename.
As for custom themes, you theme folder should go into “./custom/themes/” directory.
Again, Bash-it is a community driven project, so if you think you scripts will be useful to the community you can consider contributing them to the main project on GitHub. That’s how it will keep growing better.
Comments
Post a Comment