def _get_cmd_completions(include_hidden, include_aliases, prefix=''):
 assert cmdutils.cmd_dict
 cmdlist = []
 cmd_to_keys = objreg.get('key-config').get_reverse_bindings_for('normal')
 for obj in set(cmdutils.cmd_dict.values()):
  hide_debug = (obj.debug and (not objreg.get('args').debug))
  hide_hidden = (obj.hide and (not include_hidden))
  if (not (hide_debug or hide_hidden or obj.deprecated)):
   bindings = ', '.join(cmd_to_keys.get(obj.name, []))
   cmdlist.append(((prefix + obj.name), obj.desc, bindings))
 if include_aliases:
  for (name, cmd) in config.section('aliases').items():
   bindings = ', '.join(cmd_to_keys.get(name, []))
   cmdlist.append((name, "Alias for '{}'".format(cmd), bindings))
 return cmdlist

def _get_cmd_completions ( include_hidden , include_aliases , prefix = '' ) : assert cmdutils . cmd_dict cmdlist = [ ] cmd_to_keys = objreg . get ( 'key-config' ) . get_reverse_bindings_for ( 'normal' ) for obj in set ( cmdutils . cmd_dict . values ( ) ) : hide_debug = ( obj . debug and ( not objreg . get ( 'args' ) . debug ) ) hide_hidden = ( obj . hide and ( not include_hidden ) ) if ( not ( hide_debug or hide_hidden or obj . deprecated ) ) : bindings = ', ' . join ( cmd_to_keys . get ( obj . name , [ ] ) ) cmdlist . append ( ( ( prefix + obj . name ) , obj . desc , bindings ) ) if include_aliases : for ( name , cmd ) in config . section ( 'aliases' ) . items ( ) : bindings = ', ' . join ( cmd_to_keys . get ( name , [ ] ) ) cmdlist . append ( ( name , "Alias for '{}'" . format ( cmd ) , bindings ) ) return cmdlist
get a list of completions info for commands .