ZSH is the default shell in macOS. If you use Oh my Zsh to manage the ZSH configuration plugins and a theme to prettify the terminal, you can also use several built-in utilities.
One such utility is the zsh_stats
command, which provides a list of your top twenty most frequently used commands and how many times each command has run. To use it, run the following command from a terminal window:
zsh_stats
This command will display an output like this:
It is useful for analyzing your command usage patterns.