more accurate command line detection