Select shortest path

Would be great to have this so that selecting loops is not trial and error.