Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 15 lines (13 sloc) 314 Bytes
#!/bin/sh
#
# Searches the Fish shell history for the given term.
# If no term is given, then lists the entire history.
#
# Written in 2010 by Suraj N. Kurapati <https://github.com/sunaku>
cat ~/.config/fish/fish_history* |
if [ $# -gt 0 ]; then
egrep -hi "$@"
else
grep -v '^#'
fi |
sort | uniq -c | sort -n