Simplified logic in pcomplete