top_history.sh
is a script that displays the top 10 most used commands from the zsh history. It generates a bar chart using Gnuplot to visualize the command frequencies.
Before using top_history.sh
, make sure you have the following requirements installed on your system:
-
Zsh Shell: This script is designed for use with the Zsh shell. Ensure you have Zsh installed as your default shell.
-
Gnuplot: Gnuplot is used to create the ASCII bar chart. You must have Gnuplot installed on your system. You can install it using package managers like
apt
,brew
, oryum
, depending on your operating system.
Follow these steps to use top_history.sh
:
-
Download the Script:
- Download the
top_history.sh
script to your local machine.
- Download the
-
Make the Script Executable:
- Open a terminal.
- Navigate to the directory where
top_history.sh
is located. - Run the following command to make the script executable:
chmod +x top_history.sh
-
Run the Script:
- Execute the script by running the following command in the terminal:
./top_history.sh
- Execute the script by running the following command in the terminal:
Here's an example of what the script's output might look like:
Top 10 Most Used Commands
4000 +----------------------------------------------------------------+
| *##* + + + + + + + + + |
3500 |-*##* +-|
| *##* |
| *##* |
3000 |-*##* +-|
| *##* |
2500 |-*##* +-|
| *##* |
2000 |-*##* +-|
| *##* |
1500 |-*##* +-|
| *##* |
1000 |-*##* +-|
| *##* **** |
| *##* *##* **** **** |
500 |-*##* *##* *##* *##* **** **** **** +-|
| *##* *##* *##* *##* *##* *##* *##* **** **** **** |
0 +----------------------------------------------------------------+
git vim ack cd heroku rails tig puma bundle brew