bashrc & zshrc: fix top10 function

it was missing escaping of \history and it was returning timestamps
This commit is contained in:
Mikaela Suomalainen 2014-10-07 08:49:35 +03:00
parent c6c4fa3d59
commit e95b5fa006
2 changed files with 2 additions and 2 deletions

2
bashrc
View File

@ -618,7 +618,7 @@ JUSTYOUARRAY=($(lynx -dump http://downforeveryoneorjustme.com/$1 | grep -o "It's
# Topt10 commands, copied from the ultimate bashrc http://goo.gl/qGK5j
function top10() {
# copyright 2007 - 2010 Christopher Bratusek
history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head
\history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head
}
# ex command. Copied from bashrc of bioterror ( http://ricecows.org/configs/bash/.bashrc ). Original comment below:

2
zshrc
View File

@ -591,7 +591,7 @@ JUSTYOUARRAY=($(lynx -dump http://downforeveryoneorjustme.com/$1 | grep -o "It's
# Topt10 commands, copied from the ultimate bashrc http://goo.gl/qGK5j
function top10() {
# copyright 2007 - 2010 Christopher Bratusek
history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head
\history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head
}
# ex command. Copied from zshrc of bioterror ( http://ricecows.org/configs/zsh/.zshrc ). Original comment below: