File: //opt/alt/python311/lib/python3.11/site-packages/pygments/lexers/__pycache__/shell.cpython-311.pyc
�
Y�Zg�� � �� � d Z ddlZddlmZmZmZmZmZmZm Z m
Z
mZmZ ddl
mZmZmZmZmZmZmZmZmZmZ ddlmZ g d�Z G d� de� � Z G d � d
e� � Z G d� de� � Z G d
� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z! G d� de� � Z" G d� de� � Z# G d� de� � Z$ G d� de� � Z% G d� de� � Z&dS )z�
pygments.lexers.shell
~~~~~~~~~~~~~~~~~~~~~
Lexers for various shells.
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)
�Lexer�
RegexLexer�
do_insertions�bygroups�include�default�this�using�words�line_re)
�Punctuation�
Whitespace�Text�Comment�Operator�Keyword�Name�String�Number�Generic��shebang_matches)� BashLexer�BashSessionLexer� TcshLexer�
BatchLexer�SlurmBashLexer�MSDOSSessionLexer�PowerShellLexer�PowerShellSessionLexer�TcshSessionLexer�FishShellLexer�
ExeclineLexerc � � e Zd ZdZdZg d�Zg d�Zg d�ZdZdZ e
d� � d ej d
f e
d� � e
d� � gd
e
dfde
dfdej dfdej fdej fdefgd ee
e� � fdej fdej fdej fdej fd eej ee� � fdefdefdefdefg
d ej fd!ej d"fd#ej fd$ej fd%efd&efd'efd(efd)efd*efd+efgd!ej d,fd-ej f e
d� � gd.ej d,fd/e
fd0ej fd1efd2ef e
d3� � gd4e
d,f e
d3� � gd5e
d,fd6efd7efd8efd9efd:efd;ej f e
d3� � gd ej d,f e
d3� � gd<� Zd=� Zd>S )?r z.
Lexer for (ba|k|z|)sh shell scripts.
�Bash)�bash�sh�ksh�zsh�shell�openrc)z*.shz*.kshz*.bashz*.ebuildz*.eclassz*.exheres-0z*.exlibz*.zshz.bashrc�bashrcz.bash_*zbash_*�zshrcz.zshrcz.kshrc�kshrc�PKGBUILD)zapplication/x-shzapplication/x-shellscriptztext/x-shellscript�(https://en.wikipedia.org/wiki/Unix_shellz0.6�basic�`� backticks�data�interp�\$\(\(�math�\$\(�paren�\$\{#?�curlyz\$[a-zA-Z_]\w*z\$(?:\d+|[#$?!_*@-])�\$zj\b(if|fi|else|while|in|do|done|for|then|return|function|case|select|break|continue|until|esac|elif)(\s*)\baG \b(alias|bg|bind|builtin|caller|cd|command|compgen|complete|declare|dirs|disown|echo|enable|eval|exec|exit|export|false|fc|fg|getopts|hash|help|history|jobs|kill|let|local|logout|popd|printf|pushd|pwd|read|readonly|set|shift|shopt|source|suspend|test|time|times|trap|true|type|typeset|ulimit|umask|unalias|unset|wait)(?=[\s)`])�\A#!.+\n�#.*\n�\\[\w\W]z(\b\w+)(\s*)(\+?=)z[\[\]{}()=]z<<<�<<-?\s*(\'?)\\?(\w+)[\w\W]+?\2z&&|\|\|z(?s)\$?"(\\.|[^"\\$])*"�"�string�#(?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'� (?s)'.*?'�;�&z\|�\s+z\d+\b�[^=\s\[\]{}()$"\'`\\<&|;]+�<�#pop� (?s)(\\\\|\\[0-7]+|\\.|[^"\\$])+�\}�:-�\w+z
[^}:"\'`$\\]+�:�root�\)�\)\)z\*\*|\|\||<<|>>|[-+*/%^|&<>]z\d+#[\da-zA-Z]+� \d+#(?! )z0[xX][\da-fA-F]+�\d+z[a-zA-Z_]\w*) rP r5 r1 r4 rB r; r9 r7 r3 c �X � t | d� � rdS | � d� � rdS d S )Nz (ba|z|)sh� z$ g�������?)r �
startswith��texts �H/opt/alt/python311/lib/python3.11/site-packages/pygments/lexers/shell.py�analyse_textzBashLexer.analyse_textz s<