added substring history script from http://fishshell.com