#NEWLINE# def get_all_cmd_keys_and_aliases( self , caller = None ) : #NEWLINE# #INDENT# '\n        Collects keys/aliases from commands\n\n        Args:\n            caller (Object, optional): If set, this is used to check access permissions\n                on each command. Only commands that pass are returned.\n\n        Returns:\n            names (list): A list of all command keys and aliases in this cmdset. If `caller`\n                was given, this list will only contain commands to which `caller` passed\n                the `call` locktype check.\n\n        ' #NEWLINE# names = [ ] #NEWLINE# if caller : #NEWLINE# #INDENT# [ names . extend ( cmd . _keyaliases ) for cmd in self . commands if cmd . access ( caller ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# [ names . extend ( cmd . _keyaliases ) for cmd in self . commands ] #NEWLINE# #UNINDENT# return names