support up/down for retrieving last/next command