refine filter_command_lines.