
    <i                         S r SSKrSSKJr  \R
                  R                  5       (       a  SSKJr  OSSK	Jr  \S 5       r
 " S S\5      rg)z,
Tab completion for our interpreter prompt.
    N)uses_settings)	lru_cachec                 z   UR                  S/ 5      nU c  U$ U R                  SS5      nU(       aP  UR                  5        H;  nUR                  SS5      S   R	                  S5      nUR                  SU-  5        M=     OUR                  S	5        U R                  S
S5      nU(       ai  UR                  5        HT  nUR                  SS5      S   nUR                  SU-  5        UR                  SU-  5        UR                  SU-  5        MV     OU/ SQ-  nSnU HV  u  pxU R                  US5      nU(       a'  X#R                  5        V	s/ s H  oU	-   PM	     sn	-  nME  UR                  U5        MX     UR                  S0 5      n
U
R                  5        H  nUR                  SU-   5        M     U$ s  sn	f )z&
Provides commands recognized by tor.
autocompleteNz
info/names    r   *z
GETINFO %szGETINFO zconfig/namesz
GETCONF %sz
SETCONF %szRESETCONF %s)zGETCONF zSETCONF z
RESETCONF ))z
SETEVENTS zevents/names)zUSEFEATURE zfeatures/names)zSIGNAL zsignal/namesz
help.usagez/help )getget_info
splitlinessplitrstripappendkeys)
controllerconfigcommandsresultslineoptionoptionsprefixgetinfo_cmdvalue
usage_infocmds               W/home/james-whalen/.local/lib/python3.13/site-packages/stem/interpreter/autocomplete.py_get_commandsr      s    ZZ+(O
 d3'""$zz#q!!$++C0foolV+, % OOJ
 5'""$zz#q!!$foolV+,oolV+,oonv-. % 66H
' %f!!+t4G}}?eE>??hoof % zz,+*__cOOHsN#  
/ @s   F8c                   :    \ rS rSrS r\" 5       S 5       rS rSrg)AutocompleterS   c                 $    [        U5      U l        g )N)r   	_commands)selfr   s     r   __init__Autocompleter.__init__T   s    ":.DN    c                     UR                  5       nU R                   Vs/ s H*  o3R                  5       R                  U5      (       d  M(  UPM,     sn$ s  snf )z
Provides autocompletion matches for the given text.

:param str text: text to check for autocompletion matches with

:returns: **list** with possible matches
)lowerr#   
startswith)r$   textlowercase_textr   s       r   matchesAutocompleter.matchesW   s<     ZZ\N>>T>CYY[-C-CN-SC>TTTs   'A
Ac                 L     U R                  U5      U   $ ! [         a     gf = f)a  
Provides case insensetive autocompletion options, acting as a functor for
the readlines set_completer function.

:param str text: text to check for autocompletion matches with
:param int state: index of result to be provided, readline fetches matches
  until this function provides None

:returns: **str** with the autocompletion match, **None** if eithe none
  exists or state is higher than our number of matches
N)r-   
IndexError)r$   r+   states      r   completeAutocompleter.completed   s-    \\$&& s    
##)r#   N)	__name__
__module____qualname____firstlineno__r%   r   r-   r2   __static_attributes__ r'   r   r    r    S   s$    / ;
U 
Ur'   r    )__doc__stem.prereqstemstem.interpreterr   prereq_is_lru_cache_available	functoolsr   stem.util.lru_cacher   objectr    r9   r'   r   <module>rC      sL     *;;&&((!+ = =@!F !r'   