search terminal history by command, from https://coderwall.com/p/oqtj8w