Display the history and optionally grep
Ever wondered how good it would be to have a command/function that would display the history or display the history with <a class="zem_slink" title="Grep" rel="wikipedia" href="http://en.wikipedia.org/wiki/Grep">grep.
Would be really good right, well someone thought about this 🙂
$ h() { if [ -z ”$1” ]; then history; else history | grep ”$@”; fi; }
Place this in your .bash_profile and you can use it two different ways. If you issue ’h’ on its own, then it acts like the history command. If you issue:
Continue reading