3 ��X�z � @ s4 d Z ddlZddlmZmZmZmZmZmZm Z m Z mZ ddlm Z mZmZmZmZmZmZmZmZ ddlmZ dddd d ddd dg Zejd�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG dd � d e�ZG dd� de�Z G dd � d e�Z!G dd� de�Z"G dd� de�Z#G dd� de�Z$dS )z� pygments.lexers.shell ~~~~~~~~~~~~~~~~~~~~~ Lexers for various shells. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � N) �Lexer� RegexLexer� do_insertions�bygroups�include�default�this�using�words) �Punctuation�Text�Comment�Operator�Keyword�Name�String�Number�Generic)�shebang_matches� BashLexer�BashSessionLexer� TcshLexer� BatchLexer�MSDOSSessionLexer�PowerShellLexer�PowerShellSessionLexer�TcshSessionLexer�FishShellLexerz.*? c @ s� e Zd ZdZdZdddddgZdd d ddd dddddddddgZddgZed�de j dfed�ed�gdedfd ed!fd"e jd#fd$e jfd%e jfd&efgd'eee�fd(e jfd)ejfd*ejfd+e jfd,ee jee�fd-efd.efd/e fd0efg d1e jfd2e jd3fd4e jfd5e jfd6efd7efd8efd9efd:efd;efd<efgd2e jd=fd>e jfed�gd?e jd=fd@efdAe jfdBefdCefedD�gdEed=fedD�gdFed=fdGefdHefdIefdJefedD�gde j d=fedD�gdK� ZdLdM� ZdNS )Or zI Lexer for (ba|k|z|)sh shell scripts. .. versionadded:: 0.6 ZBashZbashZshZkshZzsh�shellz*.shz*.kshz*.bashz*.ebuildz*.eclassz*.exheres-0z*.exlibz*.zshz.bashrcZbashrcz.bash_*zbash_*Zzshrcz.zshrcZPKGBUILDzapplication/x-shzapplication/x-shellscript�basic�`� backticks�data�interpz\$\(\(�mathz\$\(�parenz\$\{#?�curlyz\$[a-zA-Z_]\w*z\$(?:\d+|[#$?!_*@-])z\$za\b(if|fi|else|while|do|done|for|then|return|function|case|select|continue|until|esac|elif)(\s*)\baM \b(alias|bg|bind|break|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)`])z\A#!.+\nz#.*\nz\\[\w\W]z(\b\w+)(\s*)(\+?=)z[\[\]{}()=]z<<<z<<-?\s*(\'?)\\?(\w+)[\w\W]+?\2z&&|\|\|z%(?s)\$?"(\\\\|\\[0-7]+|\\.|[^"\\$])*"�"�stringz#(?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'z (?s)'.*?'�;�&z\|z\s+z\d+\bz[^=\s\[\]{}()$"\'`\\<&|;]+�<z#popz (?s)(\\\\|\\[0-7]+|\\.|[^"\\$])+z\}z:-z\w+z [^}:"\'`$\\]+�:�rootz\)z\)\)z[-+*/%^|&]|\*\*|\|\|z\d+#\d+z \d+#(?! )z\d+) r- r# r r"