mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-07-31 06:07:44 +00:00

This pull request adds a script containing a one-liner that can be used to get a table containing the top 5 used commands by using the history file
2 lines
254 B
Text
2 lines
254 B
Text
# Evaluates the top 5 most used commands present in `nushell/history.txt`.
|
|
if $nu.history-enabled { open $nu.history-path | lines | uniq --count | sort-by --reverse count | first 5 | rename command amount } else { print --stderr "History is disabled!" }
|