A Rust implementation of fh (frequent history) — a tool that inspects your bash history and ranks commands by how often you run them.
The original implementation was a bash alias:
alias fh="history | tail -n 1000 | sed -e 's/^ *[0-9]* //g' | awk '{print \$1\" \"\$2}' | sort | uniq -c | sort -g | tail -n 100 | awk '{printf \"\n\"\$1\" \"; i=0; do{printf \$2\" \"$3\" \"$4; i++}while(i<\$1);}' ; echo"fh reads your bash history, counts how frequently each command has been executed, and prints the most common ones in order. This helps you identify commands that are both long and frequently used — good candidates for aliases — which can meaningfully speed up your workflow.