Robert R Evans | 76ed68d | 2010-10-02 12:29:17 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Robert R Evans | 9c7cd9a | 2010-10-02 11:55:34 -0700 | [diff] [blame] | 3 | # append to bash_history if Terminal.app quits |
| 4 | shopt -s histappend |
| 5 | |
| 6 | # history handling |
| 7 | # |
| 8 | # Erase duplicates |
| 9 | # Bash History |
| 10 | export HISTCONTROL="ignoredups" |
| 11 | export HISTCONTROL=erasedups |
| 12 | |
| 13 | # resize history size |
| 14 | export HISTSIZE=5000 |
| 15 | |
Robert R Evans | 070107a | 2010-10-02 15:23:57 -0700 | [diff] [blame] | 16 | export AUTOFEATURE=true autotest |
| 17 | |
| 18 | function rh { |
| 19 | history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head |
| 20 | } |