a
    lc                     @   sB   d dl mZmZ d dlmZ d dlmZ dgZG dd deZdS )    )ExecutableCompleterPathCompleter)compile)GrammarCompleterSystemCompleterc                       s&   e Zd ZdZdd fddZ  ZS )r   z(
    Completer for system commands.
    N)returnc              
      s`   t ddd dd ddd dd dd}t |t td	d
dtd	d
dtd	d
dd d S )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                 S   s   |  ddS )N"\"replacestring r   d/var/www/html/django/DPS/env/lib/python3.9/site-packages/prompt_toolkit/contrib/completers/system.py<lambda>&       z*SystemCompleter.__init__.<locals>.<lambda>c                 S   s   |  ddS )N'\'r
   r   r   r   r   r   '   r   )double_quoted_filenamesingle_quoted_filenamec                 S   s   |  ddS )Nr	   r   r
   r   r   r   r   r   +   r   c                 S   s   |  ddS )Nr   r   r
   r   r   r   r   r   -   r   )Zescape_funcsZunescape_funcsFT)Zonly_directories
expanduser)
executablefilenamer   r   )r   super__init__r   r   )selfg	__class__r   r   r      s*    !
zSystemCompleter.__init__)__name__
__module____qualname____doc__r   __classcell__r   r   r   r   r   
   s   N)	Z$prompt_toolkit.completion.filesystemr   r   Z1prompt_toolkit.contrib.regular_languages.compilerr   Z3prompt_toolkit.contrib.regular_languages.completionr   __all__r   r   r   r   r   <module>   s
   