summaryrefslogtreecommitdiff
path: root/pygments/lexers/shell.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of https://github.com/mathiasertl/pygments into ↵Matthäus G. Chajdas2021-01-301-6/+2
|\ | | | | | | | | | | | | | | | | mathiasertl-master Resolve conflicts, move tests to snippets, regenerate example files. # Conflicts: # tests/test_shell.py
| * only print PS2 prompt if backslash continuation is enabledMathias Ertl2021-01-101-5/+1
| |
| * make PS2 contain a spaceMathias Ertl2021-01-101-1/+1
| |
* | Run pyupgrade across codebase to modernize syntax and patterns (#1622)Jon Dufresne2021-01-171-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | pyupgrade is a tool to automatically upgrade syntax for newer versions of the Python language. The project has been Python 3 only since 35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups: - Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all source files as utf-8 by default. - Replace IOError/EnvironmentError with OSError. Python 3 unified these exceptions. The old names are aliases only. - Use the Python 3 shorter super() syntax. - Remove "utf8" argument form encode/decode. In Python 3, this value is the default. - Remove "r" from open() calls. In Python 3, this value is the default. - Remove u prefix from Unicode strings. In Python 3, all strings are Unicode. - Replace io.open() with builtin open(). In Python 3, these functions are functionally equivalent. Co-authored-by: Matthäus G. Chajdas <Anteru@users.noreply.github.com>
* Bump copyright year.Matthäus G. Chajdas2021-01-031-1/+1
|
* Fix #1652.Matthäus G. Chajdas2020-12-291-1/+1
| | | | in is a keyword in Bash, ZSH, and KSH.
* consider trailing whitespace a part of the prompt, making copy/paste more ↵Mathias Ertl2020-12-251-1/+1
| | | | straight forward
* shell: improve docstrings for the "session" type lexersGeorg Brandl2020-11-111-5/+10
| | | | fixes #1599
* all: fixup remaining regexlint warningsGeorg Brandl2020-09-061-18/+18
|
* Update copyright year (fixes #1514.)Matthäus G. Chajdas2020-08-221-1/+1
|
* Manually merge PR#1497.Matthäus G. Chajdas2020-08-221-3/+2
| | | | | This is a manual merge as we don't want to pull in the documentation change as part of this fix for a cleaner history.
* Add support for PowerShell Remoting sessions (#1398)Geert Smelt2020-06-301-1/+1
| | | | | | | | | | | * Add support for PowerShell Remoting sessions * Add test case for PowerShell Remoting sessions * Make whitespace after prompt optional * Fix test case containing backslashes * Add test case for local PowerShell sessions
* Add execline lexer (#1393)Molly Miller2020-04-101-1/+62
| | | | | | | | | | | | | | | | | * Implement lexer for execline. This commit introduces a lexer for Laurent Bercot's execline scripting language (https://skarnet.org/software/execline) based on Pygments' existing bash lexer, with some minor adaptations for execline's variable naming rules. * Add versionadded note and website link to execline lexer. * Add execline to languages.rst and example execline script * Explicitly mark non-special characters in execline lexer as Text * Correct execline lexer version addded Co-authored-by: Molly Miller <sysvinit@users.noreply.github.com>
* Fix #1253.Matthäus G. Chajdas2019-11-251-7/+23
|
* Fixup all headers and some more minor problems.2.4.2Georg Brandl2019-05-281-1/+1
|
* Merged in hroncok/pygments-main/doscon_prompt (pull request #734)Anteru2019-05-091-1/+1
|\ | | | | | | Recognize single > as a prompt in doscon
| * Recognize single > as a prompt in dosconMiro Hron?ok2017-09-221-1/+1
| | | | | | | | Fixes https://bitbucket.org/birkenfeld/pygments-main/issues/1380/lexer-for-cmdexe-interactive-session-with
* | Fix #1494.Matth?us G. Chajdas2019-03-061-1/+1
| | | | | | | | | | This fixes the catastrophic backtracking which previously occured for strings like "\057hom\145/e2\071501\057pub\154ic_\150tml\057a
* | Small cleanups to the Slurm lexer.Matth?us G. Chajdas2018-12-211-2/+4
| | | | | | | | Remove debug output, add a test file for the Slurm lexer.
* | Merged in bgcook/pygments-main (pull request #760)Anteru2018-12-211-8/+25
|\ \ | | | | | | | | | add Slurm script parser
| * \ Merged in witchard/pygments-main (pull request #706)Anteru2018-12-171-1/+1
| |\ \ | | | | | | | | | | | | Added support for text/x-shellscript mime type.
| | * | Added support for text/x-shellscript mime type. Fixes #1332.witchard2017-02-181-1/+1
| | |/
| * | Fix PowerShellLexer defining built-in aliases incorrectly.Matth?us G. Chajdas2018-12-161-2/+2
| | |
| * | Add verbs from PS v5.1Chris Duck2017-02-111-7/+11
| | | | | | | | | | | | | | | | | | Adds the following verbs: approve, assert, backup, block, close, compress, confirm, deny, dismount, edit, find, grant, hide, initialize, install, lock, merge, mount, open, optimize, protect, publish, redo, repair, request, revoke, save, search, step, submit, switch, sync, unblock, uninstall, unlock, unprotect, unpublish, watch
| * | Add built-in aliases to PowerShellLexerChris Duck2017-02-111-0/+13
| |/
* | added Slurm script parserBrandon Cook2018-05-111-1/+21
|/
* all: run regexlint, add a few more changelog entriesGeorg Brandl2017-01-221-1/+1
|
* Merged in belak/pygments-main/lexers-shell-zsh-files (pull request #654)Georg Brandl2017-01-221-4/+5
|\ | | | | | | Highlight zsh files using the BashLexer
| * Highlight zsh files using the BashLexerKaleb Elwert2016-08-181-4/+5
| |
* | Merged in dscorbett/pygments-batch (pull request #620)Georg Brandl2017-01-221-4/+7
|\ \ | | | | | | | | | Fix Batch variables after IF
| * | Fix Batch variables after IFDavid Corbett2016-07-131-4/+7
| |/
| * Only += is an operatorCamil Staps2016-06-161-3/+1
| |
| * Fixes #1246Camil Staps2016-06-161-0/+2
| |
| * Add backslash-continuation support to console lexer.Tim Hatch2016-06-011-1/+7
| | | | | | | | Fixes #1237
| * Improve number highlighting in bash.Tim Hatch2016-06-011-1/+1
| | | | | | | | Fixes #1244
| * Fix Batch variables in FOR loop commandsDavid Corbett2016-05-251-2/+2
| |
| * Fix Batch stringsDavid Corbett2016-03-011-4/+4
| |
| * Bash lexer: letter from "g" to "z" should also be treated as part of a ↵Hong Xu2016-02-281-1/+1
| | | | | | | | | | | | variable name. Fixes #1214
| * Add support for highlighting the exheres-0 formatGeorg Brandl2016-02-021-0/+1
| | | | | | | | From: "Wulf C. Krueger" <philantrop@exherbo.org>
| * merge default into stableGeorg Brandl2016-01-171-0/+783
|
* Copyright update.Georg Brandl2017-01-221-1/+1
|
* Add support for partials and path segments for Handlebars.Christian Hammond2016-11-041-0/+790
This introduces support for some missing features to the Handlebars lexer: Partials and path segments. Partials mostly appeared to work before, but the `>` in `{{> ... }}` would appear as a syntax error, as could other components of the partial. This change introduces support for: * Standard partials: `{{> partialName}}` * Partials with parameters: `{{> partialName varname="value"}}` * Ddynamic partials: `{{> (partialFunc)}}` * Ddynamic partials with lookups: `{{> (lookup ../path "partialName")}}` * Partial blocks: `{{> @partial-block}}` * Inline partials: `{{#*inline}}..{{/inline}}` It also introduces support for path segments, which can reference content in the current context or in a parent context. For instance, `this.name`, `this/name`, `./name`, `../name`, `this/name`, etc. These are all now tracked as variables.