
    l:i                     F    d dl mZmZ ddlmZ ddlmZmZ  G d de      Zy)	    )PopenPIPE   )DEVNULL   )GenericShellConfigurationc                   (    e Zd ZdZd Zd Zd Zd Zy)
Powershell
PowerShellc                     d|z   dz   S )Nz	function ak   {
    $history = (Get-History -Count 1).CommandLine;
    if (-not [string]::IsNullOrWhiteSpace($history)) {
        $fuck = $(thefuck $args $history);
        if (-not [string]::IsNullOrWhiteSpace($fuck)) {
            if ($fuck.StartsWith("echo")) { $fuck = $fuck.Substring(5); }
            else { iex "$fuck"; }
        }
    }
    [Console]::ResetColor() 
}
 )self
alias_names     P/var/www/html/bot/venv/lib/python3.12/site-packages/thefuck/shells/powershell.py	app_aliaszPowershell.app_alias	   s    Z' 
+ 
 
	    c                 2    dj                  d |D              S )Nz -and c              3   >   K   | ]  }d j                  |        yw)z({0})N)format).0cs     r   	<genexpr>z"Powershell.and_.<locals>.<genexpr>   s     BAgnnQ/Bs   )join)r   commandss     r   and_zPowershell.and_   s    ~~BBBBr   c                      t        dddd      S )Nziex "$(thefuck --alias)"z$profilez
. $profileF)contentpathreloadcan_configure_automatically)r	   )r   s    r   how_to_configurezPowershell.how_to_configure   s    !/(-	/ 	/r   c                    	 t        ddgt        t              }|j                  j	                         j                  d      j                         j                  d      }dj                  |d   j                               S # t        $ rU t        dd	gt        t              }|j                  j	                         j                  d      j                         d   cY S w xY w)
z(Returns the version of the current shellzpowershell.exez$PSVersionTable.PSVersion)stdoutstderrzutf-8
.pwshz	--version)
r   r   r   r$   readdecoderstripsplitr   IOError)r   procversions      r   _get_versionzPowershell._get_version    s    		B!#>? D kk&&(//8??AGGMG88GBK--/00 	B&+.tGLD;;##%,,W5;;=bAA	Bs   A?B AC C N)__name__
__module____qualname__friendly_namer   r   r"   r1   r   r   r   r   r      s     MC/Br   r   N)	
subprocessr   r   utilsr   genericr   r	   r   r   r   r   <module>r9      s    "  0%B %Br   