Fixed --auto-complete implementation