PATH:
opt
/
imunify360
/
venv
/
lib
/
python3.11
/
site-packages
/
defence360agent
/
utils
/
__pycache__
� �YU��� �2 � d Z ddlZddlZddlmZmZmZ dedefd�Zdej deeedf ee f fd �Z dej dee fd �Zdej deedf deeedf ee f fd �Zdeeedf ee f deedf dee fd�Z ddej dedefd�Z ddej dedefd�Z ddej dedefd�Zeeed�Z ee� � � � � Z ddej dededefd�ZdS )z� Shell auto-completion script generators for the CLI. Introspects an argparse parser to enumerate all commands, subcommands, and flags, then emits completion scripts for bash, zsh, and fish. � N)�Dict�List�Tuple�prog�returnc �. � t j dd| � � S )zDConvert a prog name to a safe shell identifier (letters, digits, _).z[^a-zA-Z0-9]�_)�re�sub)r s �V/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/utils/completions.py�_safe_identifierr s � � �6�/�3��-�-�-� �parser.c �, � i }t | d|� � |S )z@Walk the parser tree and return {command_path: [flags]} mapping.� )�_walk_parser)r �results r �_collect_commandsr s � � 02�F����V�$�$�$��Mr c �� � g }| j D ]W}t |t j � � r�t |t j � � r�8|j D ]}|� |� � ��Xt |� � S )z:Extract all optional flags from a parser (excluding help).)�_actions� isinstance�argparse�_HelpAction�_SubParsersAction�option_strings�append�sorted)r �flags�action�opts r � _get_flagsr! s� � ��E��/� � ���f�h�2�3�3� ���f�h�8�9�9� ���(� � �C��L�L������ ��%�=�=�r �pathr c �� � t | � � }|||<