
    l:i'                     D    d dl Z d dlmZmZ d Z ed      d        Zd Zy)    N)get_closestfor_appc                     t        j                  d| j                        }|r|d   j                  d      S t        j                  d| j                        }|r|d   j                  d      S |S )Nz$\n\(did you mean one of ([^\?]+)\?\)r   z, z\n    ([^$]+)$ )refindalloutputsplit)commandpossibs     N/var/www/html/bot/venv/lib/python3.12/site-packages/thefuck/rules/mercurial.pyextract_possibilitiesr      s]    ZZ?PFayt$$ZZ)7>>:Fays##M    hgc                 ~    d| j                   v xr d| j                   v xs d| j                   v xr d| j                   v S )Nzhg: unknown commandz(did you mean one of zhg: command 'z' is ambiguous:)r	   )r   s    r   matchr      sF    !W^^3 :'7>>94'..0 4!W^^35r   c                 |    | j                   d d  }t        |       }t        |d   |      |d<   dj                  |      S )N   r   )script_partsr   r   join)r   scriptpossibilitiess      r   get_new_commandr      s?    !!!$F)'2MF1I}5F1I88Fr   )r   thefuck.utilsr   r   r   r   r    r   r   <module>r      s-    	 . 	5 5r   