added output limit for cmd_history