optimize command auto_complete