Improved history feature.

History command can to filter histories by the command parameters.