Remember recently used commands (contributed by @bsuh)