code: def enable_aliases_autocomplete(_, **kwargs):
      
      external_completions = kwargs.get('external_completions', [])
      prefix = kwargs.get('cword_prefix', [])
      cur_commands = kwargs.get('comp_words', [])
      alias_table = get_alias_table()
      # Transform aliases if they are in current commands,
      # so parser can get the correct subparser when chaining aliases
      _transform_cur_commands(cur_commands, alias_table=alias_table)
  
      for alias, alias_command in filter_aliases(alias_table):
          if alias.startswith(prefix) and alias.strip() != prefix and _is_autocomplete_valid(cur_commands, alias_command):
              # Only autocomplete the first word because alias is space-delimited
              external_completions.append(alias)
  
      # Append spaces if necessary (https://github.com/kislyuk/argcomplete/blob/master/argcomplete/__init__.py#L552-L559)
      prequote = kwargs.get('cword_prequote', '')
      continuation_chars = "=/:"
      if len(external_completions) == 1 and external_completions[0][-1] not in continuation_chars and not prequote:
          external_completions[0] += ' '
docs: Enable aliases autocomplete by injecting aliases into Azure CLI tab completion list.