add hn() func for "history -n" cmd.
Signed-off-by: kangliang.zkl <kangliang.zkl@alibaba-inc.com>