Shell: fix detection (ignore path of the process)