jm-shell is a free open source, small, highly informative and customized Bash shell, that gives you a great wealth of information about your shell activity as well as certain useful system information such as system load average, battery status of laptops/computers and much more.
Importantly, unlike Bash which only stores unique commands in a history file, for searching previously run commands – jm-shell records each and every shell activity in a log file.
Read Also: The Power of Linux “History Command” in Bash Shell
In addition, if your current directory is a code repository for any version control systems such as Git, Subversion, or Mercurial, it will provide information about your repositories (such as active branch).
- Has a status line (divider) to separate commands.
- Displays the number of items in current directory.
- Shows current location in the filesystem.
- It maintains a shell log file – full history of your shell activity.
- Displays current system load average if higher than, in red if critical (higher than 2).
- Shows the time last command finished.
- It prints an error code of last command, if any.
- Displays total time of last command if higher than 4 seconds.
- Has a prompt in the form; username@hostname:path.
- Supports multiple prompt styles.
- Supports background jobs.
- It also displays laptop battery charge status, in case it’s not full and many other features.
How to Install jm-shell in Linux Systems
To install most recent version of jm-shell, you need to clone git repository of jm-shell sources to your system and move into the local repository using following commands.
$ git clone https://github.com/jmcclare/jm-shell.git $ cd jm-shell
Next, configure Bash to use jm-shell by creating or copying a symlink from ps1, colors.sh, and color_unset.sh to the directory
~/.local/lib/bash (you need to create this directory if it doesn’t exist) as shown.
$ mkdir ~/.local/lib/bash #create the directory if it doesn’t exist $ cp -v colors.sh colors_unset.sh ps1 -t ~/.local/lib/bash/
Then source the
ps1 file by adding the following line in your ~/.bashrc shell initialization file.
Then use the prompt_style variable in your ~/.bashrc to set your prompt styles (available styles include standard, tweaked, extensive, minimal or kirby) as shown.
Save and close ~/bashrc file, then source it to see the changes.
$ source ~/.bashrc
To change the shell log file location (default is ~/.local/share/bash/shell.log), use the BASHSHELLLOGFILE variable in ~/.bashrc file.
For more information, go to the jm-shell Github Repository: https://github.com/jmcclare/jm-shell
jm-shell is a highly informative tool that includes set of scripts for customizing your Bash shell, with numerous practical and informative features for daily usage. Try it out and give us your feedback via the comment section below.