
    f	                    T    d dl mZ d dlmZmZ d dlmZ d dlmZ dgZ	 G d de      Z
y)    )annotations)ExecutableCompleterPathCompleter)compile)GrammarCompleterSystemCompleterc                  $     e Zd ZdZd fdZ xZS )r   z(
    Completer for system commands.
    c           
         t        dd d dd d d      }t        | 	  |t               t	        dd	
      t	        dd	
      t	        dd	
      d       y )Na  
                # First we have an executable.
                (?P<executable>[^\s]+)

                # Ignore literals in between.
                (
                    \s+
                    ("[^"]*" | '[^']*' | [^'"]+ )
                )*

                \s+

                # Filename as parameters.
                (
                    (?P<filename>[^\s]+) |
                    "(?P<double_quoted_filename>[^\s]+)" |
                    '(?P<single_quoted_filename>[^\s]+)'
                )
            c                &    | j                  dd      S )N"\"replacestrings    c/var/www/cvtools/html/venv/lib/python3.12/site-packages/prompt_toolkit/contrib/completers/system.py<lambda>z*SystemCompleter.__init__.<locals>.<lambda>(       &..e:T     c                &    | j                  dd      S )N'\'r   r   s    r   r   z*SystemCompleter.__init__.<locals>.<lambda>)   r   r   )double_quoted_filenamesingle_quoted_filenamec                &    | j                  dd      S )Nr   r   r   r   s    r   r   z*SystemCompleter.__init__.<locals>.<lambda>-   s    6>>%#= r   c                &    | j                  dd      S )Nr   r   r   r   s    r   r   z*SystemCompleter.__init__.<locals>.<lambda>/   s    &..PS:T r   )escape_funcsunescape_funcsFT)only_directories
expanduser)
executablefilenamer   r   )r   super__init__r   r   )selfg	__class__s     r   r$   zSystemCompleter.__init__   sq    ( ,U+T >+T	1
B 	13)5TR*7%*t+ +8%*t+		
r   )returnNone)__name__
__module____qualname____doc__r$   __classcell__)r'   s   @r   r   r      s    /
 /
r   N)
__future__r   $prompt_toolkit.completion.filesystemr   r   1prompt_toolkit.contrib.regular_languages.compilerr   3prompt_toolkit.contrib.regular_languages.completionr   __all__r    r   r   <module>r5      s*    " S E P 
4
& 4
r   