
    5pj              	          % S r SSKrSSKJr  SSKJr  SSKrSSKJr  SSK	J
r
  Sr\R                  " 5       S	-  S
\ S34\R                  " 5       S-  S
\ S34S.r\\\\\4   4   \S'   \R                  " 5       S-  S-  S-  S-  rS\4S jrS\S\4S jrS\SS4S jrS\SS4S jr\\\
" S\SSS94   r\\\
" S\SS S94   rg)!uy  Shell completion for the ``hf`` CLI, built on Click's native completion.

Click generates completion scripts activated by the ``_HF_COMPLETE`` env var (this
works out of the box because ``hf`` is a Click command). This module exposes the two
conveniences Typer used to provide — ``--install-completion`` / ``--show-completion``
— as thin eager options over that machinery.
    N)Path)	Annotated)get_completion_class   )Option_HF_COMPLETEz.bashrczeval "$(z=bash_source hf)"z.zshrcz=zsh_source hf)")bashzsh_RC_ACTIVATIONz.configfishcompletionszhf.fishreturnc                  z    [        [        R                  R                  SS5      5      R                  =(       d    S$ )NSHELL r	   )r   osenvirongetname     [/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/huggingface_hub/cli/_completion.py_detect_shellr   -   s'    

w+,11;V;r   shellc                     SSK Jn  [        U 5      nUc  [        R                  " SU  S35      eU" U0 S[
        5      R                  5       $ )Nr   )appShell '"' is not supported for completion.hf)r   r   r   clickClickException_COMPLETE_VARsource)r   r   completion_clss      r   _completion_scriptr%   1   sJ    )%0N""WUG3U#VWW#r47>>@@r   valuec                     U (       d  g [         R                  " [        [        5       5      5        [         R                  R                  5       e)N)r    echor%   r   
exceptionsExit)r&   s    r   _show_completionr+   ;   s1    	JJ!-/23





!!r   c                    U (       d  g [        5       nUS:X  a;  [        nUR                  R                  SSS9  UR	                  [        S5      5        OU[        ;   a  [        U   u  p#UR                  R                  SSS9  UR                  5       (       a  UR                  5       OSnX4;  a0  UR                  S5       nUR                  SU S35        S S S 5        OO[        R                  " SU S35      e[        R                  " U S	U S
35        [        R                  R                  5       e! , (       d  f       NH= f)Nr   T)parentsexist_okr   a
r   r   z completion installed in z+. Restart your shell for it to take effect.)r   _FISH_COMPLETION_PATHparentmkdir
write_textr%   r   exists	read_textopenwriter    r!   r(   r)   r*   )r&   r   path
activationexistingfiles         r   _install_completionr=   B   s   OE$$6*623	.	 )%0$6'+{{}}4>>#"%34

R
|2./   & ""WUG3U#VWW	JJ%1$7bcd





!!  s    D44
Ez--install-completionTz)Install completion for the current shell.)callbackis_eagerhelpz--show-completionzPShow completion for the current shell, to copy it or customize the installation.)__doc__r   pathlibr   typingr   r    click.shell_completionr   
_frameworkr   r"   homer   dictstrtuple__annotations__r1   r   r%   boolr+   r=   InstallCompletionOptShowCompletionOptr   r   r   <module>rN      s>   
    7   YY[9$?P&QRIIK("h}o=M$NO/S%c	**+  		i/&8=H9T <s <Ac Ac A"D "T ""t " "* !
$8	  
!_	 r   