mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-04-17 11:35:32 +08:00
Compare commits
No commits in common. "master" and "0.7.0" have entirely different histories.
@ -7,9 +7,3 @@ end_of_line = lf
|
|||||||
tab_width = 2
|
tab_width = 2
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
|
||||||
[Makefile]
|
|
||||||
tab_width = 8
|
|
||||||
indent_size = 8
|
|
||||||
indent_style = tab
|
|
||||||
|
|
||||||
|
75
.github/workflows/test.yml
vendored
75
.github/workflows/test.yml
vendored
@ -1,75 +0,0 @@
|
|||||||
---
|
|
||||||
name: Tests
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
- '**.png'
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
- '**.png'
|
|
||||||
schedule:
|
|
||||||
- cron: '29 7 * * 1'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
version:
|
|
||||||
- master
|
|
||||||
- 5.9
|
|
||||||
- 5.8.1
|
|
||||||
- 5.8
|
|
||||||
- 5.7.1
|
|
||||||
- 5.7
|
|
||||||
- 5.6.2
|
|
||||||
- 5.6.1
|
|
||||||
- 5.6
|
|
||||||
- 5.5.1
|
|
||||||
- 5.5
|
|
||||||
- 5.4.2
|
|
||||||
- 5.4.1
|
|
||||||
- 5.4
|
|
||||||
- 5.3.1
|
|
||||||
- 5.3
|
|
||||||
- 5.2
|
|
||||||
- 5.1.1
|
|
||||||
- 5.1
|
|
||||||
- 5.0.8
|
|
||||||
- 5.0.7
|
|
||||||
- 5.0.6
|
|
||||||
- 5.0.5
|
|
||||||
- 5.0.4
|
|
||||||
- 5.0.3
|
|
||||||
- 5.0.2
|
|
||||||
- 5.0.1
|
|
||||||
- 5.0.0
|
|
||||||
- 4.3.17
|
|
||||||
- 4.3.16
|
|
||||||
- 4.3.15
|
|
||||||
- 4.3.14
|
|
||||||
- 4.3.13
|
|
||||||
- 4.3.12
|
|
||||||
- 4.3.11
|
|
||||||
container:
|
|
||||||
image: ghcr.io/zsh-users/zsh:${{ matrix.version }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- run: install_packages bsdmainutils make procps
|
|
||||||
- run: make test
|
|
||||||
|
|
||||||
notify:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: test
|
|
||||||
if: failure() && (github.repository_owner == 'zsh-users')
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Notify IRC
|
|
||||||
uses: Gottox/irc-message-action@v2
|
|
||||||
with:
|
|
||||||
channel: '#zsh-syntax-highlighting'
|
|
||||||
nickname: zsyh-gh-bot
|
|
||||||
message: '${{ github.ref }} failed tests: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
|
|
55
.travis.yml
Normal file
55
.travis.yml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
language: generic
|
||||||
|
sudo: required
|
||||||
|
|
||||||
|
env:
|
||||||
|
- ZSH=master
|
||||||
|
- ZSH=5.7.1
|
||||||
|
- ZSH=5.7
|
||||||
|
- ZSH=5.6.2
|
||||||
|
- ZSH=5.6.1
|
||||||
|
- ZSH=5.6
|
||||||
|
- ZSH=5.5.1
|
||||||
|
- ZSH=5.5
|
||||||
|
- ZSH=5.4.2
|
||||||
|
- ZSH=5.4.1
|
||||||
|
- ZSH=5.4
|
||||||
|
- ZSH=5.3.1
|
||||||
|
- ZSH=5.3
|
||||||
|
- ZSH=5.2
|
||||||
|
- ZSH=5.1.1
|
||||||
|
- ZSH=5.1
|
||||||
|
- ZSH=5.0.8
|
||||||
|
- ZSH=5.0.7
|
||||||
|
- ZSH=5.0.6
|
||||||
|
- ZSH=5.0.5
|
||||||
|
- ZSH=5.0.4
|
||||||
|
- ZSH=5.0.3
|
||||||
|
- ZSH=5.0.2
|
||||||
|
- ZSH=5.0.1
|
||||||
|
- ZSH=5.0.0
|
||||||
|
- ZSH=4.3.17
|
||||||
|
- ZSH=4.3.16
|
||||||
|
- ZSH=4.3.15
|
||||||
|
- ZSH=4.3.14
|
||||||
|
- ZSH=4.3.13
|
||||||
|
- ZSH=4.3.12
|
||||||
|
- ZSH=4.3.11
|
||||||
|
|
||||||
|
script: docker run -v $PWD:/work -w /work zshusers/zsh:${ZSH} /bin/sh -c 'install_packages make procps && make test'
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
webhooks:
|
||||||
|
urls:
|
||||||
|
- https://webhooks.gitter.im/e/367e241cdea60cb2070b
|
||||||
|
on_success: change
|
||||||
|
on_failure: always
|
||||||
|
on_start: never
|
||||||
|
irc:
|
||||||
|
channels:
|
||||||
|
- "chat.freenode.net#zsh-syntax-highlighting"
|
||||||
|
on_success: change
|
||||||
|
on_failure: always
|
||||||
|
on_start: never
|
||||||
|
use_notice: true
|
||||||
|
template:
|
||||||
|
- "%{repository}/%{branch}#%{build_number}: %{message} Changes : %{compare_url} | Build : %{build_url}"
|
18
HACKING.md
18
HACKING.md
@ -67,22 +67,6 @@ expected_region_highlight=(
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
Memos and commas
|
|
||||||
----------------
|
|
||||||
|
|
||||||
We append to `region_highlight` as follows:
|
|
||||||
|
|
||||||
|
|
||||||
```zsh
|
|
||||||
region_highlight+=("$start $end $spec, memo=zsh-syntax-highlighting")
|
|
||||||
```
|
|
||||||
|
|
||||||
That comma is required to cause zsh 5.8 and older to ignore the memo without
|
|
||||||
ignoring the `$spec`. It's a hack, but given that no further 5.8.x patch
|
|
||||||
releases are planned, it's been deemed acceptable. See issue #418 and the
|
|
||||||
cross-referenced issues.
|
|
||||||
|
|
||||||
|
|
||||||
Miscellany
|
Miscellany
|
||||||
----------
|
----------
|
||||||
|
|
||||||
@ -95,5 +79,5 @@ zstyle ':completion:*:*:*:*:globbed-files' ignored-patterns {'*/',}zsh-syntax-hi
|
|||||||
IRC channel
|
IRC channel
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
We're on #zsh-syntax-highlighting on Libera.Chat.
|
We're on #zsh-syntax-highlighting on freenode.
|
||||||
|
|
||||||
|
70
INSTALL.md
70
INSTALL.md
@ -3,67 +3,31 @@ How to install
|
|||||||
|
|
||||||
### Using packages
|
### Using packages
|
||||||
|
|
||||||
First, install the package:
|
|
||||||
|
|
||||||
* Arch Linux: [community/zsh-syntax-highlighting][arch-package] / [AUR/zsh-syntax-highlighting-git][AUR-package]
|
* Arch Linux: [community/zsh-syntax-highlighting][arch-package] / [AUR/zsh-syntax-highlighting-git][AUR-package]
|
||||||
* Debian: `zsh-syntax-highlighting` package [in `stretch`][debian-package] (or in [OBS repository][obs-repository])
|
* Debian: `zsh-syntax-highlighting` package [in `stretch`][debian-package] (or in [OBS repository][obs-repository])
|
||||||
* Fedora: [zsh-syntax-highlighting package][fedora-package-alt] in Fedora 24+ (or in [OBS repository][obs-repository])
|
* Fedora: [zsh-syntax-highlighting package][fedora-package-alt] in Fedora 24+ (or in [OBS repository][obs-repository])
|
||||||
* FreeBSD: `pkg install zsh-syntax-highlighting` (port name: [`shells/zsh-syntax-highlighting`][freebsd-port])
|
* FreeBSD: `pkg install zsh-syntax-highlighting` (port name: [`shells/zsh-syntax-highlighting`][freebsd-port])
|
||||||
* Gentoo: [app-shells/zsh-syntax-highlighting][gentoo-repository]
|
* Gentoo: [mv overlay][gentoo-overlay]
|
||||||
* Mac OS X / Homebrew: `brew install zsh-syntax-highlighting` ([formula][brew-package])
|
* Mac OS X / Homebrew: [brew install zsh-syntax-highlighting][brew-package]
|
||||||
* NetBSD: `pkg_add zsh-syntax-highlighting` (port name: [`shells/zsh-syntax-highlighting`][netbsd-port])
|
|
||||||
* OpenBSD: `pkg_add zsh-syntax-highlighting` (port name: [`shells/zsh-syntax-highlighting`][openbsd-port])
|
|
||||||
* openSUSE / SLE: `zsh-syntax-highlighting` package in [OBS repository][obs-repository]
|
|
||||||
* RHEL / CentOS / Scientific Linux: `zsh-syntax-highlighting` package in [OBS repository][obs-repository]
|
|
||||||
* Ubuntu: `zsh-syntax-highlighting` package [in Xenial][ubuntu-package] (or in [OBS repository][obs-repository])
|
* Ubuntu: `zsh-syntax-highlighting` package [in Xenial][ubuntu-package] (or in [OBS repository][obs-repository])
|
||||||
|
* RHEL / CentOS / Scientific Linux: `zsh-syntax-highlighting` package in [OBS repository][obs-repository]
|
||||||
|
* openSUSE / SLE: `zsh-syntax-highlighting` package in [OBS repository][obs-repository]
|
||||||
* Void Linux: `zsh-syntax-highlighting package` [in XBPS][void-package]
|
* Void Linux: `zsh-syntax-highlighting package` [in XBPS][void-package]
|
||||||
|
|
||||||
[arch-package]: https://www.archlinux.org/packages/zsh-syntax-highlighting
|
[arch-package]: https://www.archlinux.org/packages/zsh-syntax-highlighting
|
||||||
[AUR-package]: https://aur.archlinux.org/packages/zsh-syntax-highlighting-git
|
[AUR-package]: https://aur.archlinux.org/packages/zsh-syntax-highlighting-git
|
||||||
[brew-package]: https://github.com/Homebrew/homebrew-core/blob/master/Formula/z/zsh-syntax-highlighting.rb
|
|
||||||
[debian-package]: https://packages.debian.org/zsh-syntax-highlighting
|
[debian-package]: https://packages.debian.org/zsh-syntax-highlighting
|
||||||
|
[freebsd-port]: http://www.freshports.org/textproc/zsh-syntax-highlighting/
|
||||||
|
[gentoo-overlay]: http://gpo.zugaina.org/app-shells/zsh-syntax-highlighting
|
||||||
|
[brew-package]: https://github.com/Homebrew/homebrew-core/blob/master/Formula/zsh-syntax-highlighting.rb
|
||||||
|
[ubuntu-package]: https://launchpad.net/ubuntu/+source/zsh-syntax-highlighting
|
||||||
[fedora-package]: https://apps.fedoraproject.org/packages/zsh-syntax-highlighting
|
[fedora-package]: https://apps.fedoraproject.org/packages/zsh-syntax-highlighting
|
||||||
[fedora-package-alt]: https://bodhi.fedoraproject.org/updates/?packages=zsh-syntax-highlighting
|
[fedora-package-alt]: https://bodhi.fedoraproject.org/updates/?packages=zsh-syntax-highlighting
|
||||||
[freebsd-port]: https://www.freshports.org/textproc/zsh-syntax-highlighting/
|
[obs-repository]: https://software.opensuse.org//download.html?project=shells%3Azsh-users%3Azsh-syntax-highlighting&package=zsh-syntax-highlighting
|
||||||
[gentoo-repository]: https://packages.gentoo.org/packages/app-shells/zsh-syntax-highlighting
|
|
||||||
[netbsd-port]: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/shells/zsh-syntax-highlighting/
|
|
||||||
[obs-repository]: https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-syntax-highlighting&package=zsh-syntax-highlighting
|
|
||||||
[openbsd-port]: https://cvsweb.openbsd.org/ports/shells/zsh-syntax-highlighting/
|
|
||||||
[ubuntu-package]: https://launchpad.net/ubuntu/+source/zsh-syntax-highlighting
|
|
||||||
[void-package]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/zsh-syntax-highlighting
|
[void-package]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/zsh-syntax-highlighting
|
||||||
|
|
||||||
See also [repology's cross-distro index](https://repology.org/metapackage/zsh-syntax-highlighting/versions)
|
See also [repology's cross-distro index](https://repology.org/metapackage/zsh-syntax-highlighting/versions)
|
||||||
|
|
||||||
Second, enable zsh-syntax-highlighting by sourcing the script. Running this command on the terminal will add the source line to the end of your .zshrc:
|
|
||||||
|
|
||||||
* On most Linux distributions (except perhaps NixOS):
|
|
||||||
|
|
||||||
```zsh
|
|
||||||
echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
|
|
||||||
```
|
|
||||||
|
|
||||||
* NetBSD and OpenBSD:
|
|
||||||
|
|
||||||
```zsh
|
|
||||||
echo "source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
|
|
||||||
```
|
|
||||||
|
|
||||||
* Mac OS X / Homebrew:
|
|
||||||
|
|
||||||
```zsh
|
|
||||||
echo "source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
|
|
||||||
```
|
|
||||||
|
|
||||||
Then restart zsh (such as by opening a new instance of your terminal emulator).
|
|
||||||
|
|
||||||
Alternatively, add the `source` command manually **at the end** of your `.zshrc`:
|
|
||||||
|
|
||||||
* On most Linux distributions (except perhaps NixOS):
|
|
||||||
`source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh`
|
|
||||||
* NetBSD and OpenBSD:
|
|
||||||
`source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh`
|
|
||||||
|
|
||||||
Then restart zsh.
|
|
||||||
|
|
||||||
### In your ~/.zshrc
|
### In your ~/.zshrc
|
||||||
|
|
||||||
@ -107,12 +71,6 @@ This list is incomplete as there are too many
|
|||||||
Add `antigen bundle zsh-users/zsh-syntax-highlighting` as the last bundle in
|
Add `antigen bundle zsh-users/zsh-syntax-highlighting` as the last bundle in
|
||||||
your `.zshrc`.
|
your `.zshrc`.
|
||||||
|
|
||||||
#### [Fig](https://fig.io)
|
|
||||||
|
|
||||||
Click the `Install Plugin` button on the [Fig plugin page][fig-plugin].
|
|
||||||
|
|
||||||
[fig-plugin]: https://fig.io/plugins/other/zsh-syntax-highlighting
|
|
||||||
|
|
||||||
#### [Oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)
|
#### [Oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)
|
||||||
|
|
||||||
1. Clone this repository in oh-my-zsh's plugins directory:
|
1. Clone this repository in oh-my-zsh's plugins directory:
|
||||||
@ -140,15 +98,15 @@ Zsh-syntax-highlighting is included with Prezto. See the
|
|||||||
|
|
||||||
Add `zgen load zsh-users/zsh-syntax-highlighting` to the end of your `.zshrc`.
|
Add `zgen load zsh-users/zsh-syntax-highlighting` to the end of your `.zshrc`.
|
||||||
|
|
||||||
#### [zinit](https://github.com/zdharma-continuum/zinit)
|
|
||||||
|
|
||||||
Add `zinit light zsh-users/zsh-syntax-highlighting` to the end of your
|
|
||||||
`.zshrc`.
|
|
||||||
|
|
||||||
#### [zplug](https://github.com/zplug/zplug)
|
#### [zplug](https://github.com/zplug/zplug)
|
||||||
|
|
||||||
Add `zplug "zsh-users/zsh-syntax-highlighting", defer:2` to your `.zshrc`.
|
Add `zplug "zsh-users/zsh-syntax-highlighting", defer:2` to your `.zshrc`.
|
||||||
|
|
||||||
|
#### [zplugin](https://github.com/psprint/zplugin)
|
||||||
|
|
||||||
|
Add `zplugin load zsh-users/zsh-syntax-highlighting` to the end of your
|
||||||
|
`.zshrc`.
|
||||||
|
|
||||||
|
|
||||||
### System-wide installation
|
### System-wide installation
|
||||||
|
|
||||||
|
2
Makefile
2
Makefile
@ -41,7 +41,7 @@ test:
|
|||||||
for test in highlighters/*; do \
|
for test in highlighters/*; do \
|
||||||
if [ -d $$test/test-data ]; then \
|
if [ -d $$test/test-data ]; then \
|
||||||
echo "Running test $${test##*/}"; \
|
echo "Running test $${test##*/}"; \
|
||||||
env -i QUIET=$$QUIET $${TERM:+"TERM=$$TERM"} $(ZSH) -f tests/test-highlighting.zsh "$${test##*/}"; \
|
$(ZSH) -f tests/test-highlighting.zsh "$${test##*/}"; \
|
||||||
: $$(( result |= $$? )); \
|
: $$(( result |= $$? )); \
|
||||||
fi \
|
fi \
|
||||||
done; \
|
done; \
|
||||||
|
35
README.md
35
README.md
@ -1,12 +1,12 @@
|
|||||||
zsh-syntax-highlighting [![Build Status][build-status-image]][build-status]
|
zsh-syntax-highlighting [![Build Status][build-status-image]][build-status-travis]
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
**[Fish shell][fish]-like syntax highlighting for [Zsh][zsh].**
|
**[Fish shell][fish]-like syntax highlighting for [Zsh][zsh].**
|
||||||
|
|
||||||
*Requirements: zsh 4.3.11+.*
|
*Requirements: zsh 4.3.11+.*
|
||||||
|
|
||||||
[fish]: https://fishshell.com/
|
[fish]: http://www.fishshell.com/
|
||||||
[zsh]: https://www.zsh.org/
|
[zsh]: http://www.zsh.org/
|
||||||
|
|
||||||
This package provides syntax highlighting for the shell zsh. It enables
|
This package provides syntax highlighting for the shell zsh. It enables
|
||||||
highlighting of commands whilst they are typed at a zsh prompt into an
|
highlighting of commands whilst they are typed at a zsh prompt into an
|
||||||
@ -27,11 +27,6 @@ Before: [](images/before3.png)
|
|||||||
<br/>
|
<br/>
|
||||||
After: [](images/after3.png)
|
After: [](images/after3.png)
|
||||||
|
|
||||||
Before: [](images/before4-smaller.png)
|
|
||||||
<br/>
|
|
||||||
After: [](images/after4-smaller.png)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
How to install
|
How to install
|
||||||
--------------
|
--------------
|
||||||
@ -44,23 +39,11 @@ FAQ
|
|||||||
|
|
||||||
### Why must `zsh-syntax-highlighting.zsh` be sourced at the end of the `.zshrc` file?
|
### Why must `zsh-syntax-highlighting.zsh` be sourced at the end of the `.zshrc` file?
|
||||||
|
|
||||||
zsh-syntax-highlighting works by hooking into the Zsh Line Editor (ZLE) and
|
`zsh-syntax-highlighting.zsh` wraps ZLE widgets. It must be sourced after all
|
||||||
computing syntax highlighting for the command-line buffer as it stands at the
|
custom widgets have been created (i.e., after all `zle -N` calls and after
|
||||||
time z-sy-h's hook is invoked.
|
running `compinit`). Widgets created later will work, but will not update the
|
||||||
|
|
||||||
In zsh 5.2 and older,
|
|
||||||
`zsh-syntax-highlighting.zsh` hooks into ZLE by wrapping ZLE widgets. It must
|
|
||||||
be sourced after all custom widgets have been created (i.e., after all `zle -N`
|
|
||||||
calls and after running `compinit`) in order to be able to wrap all of them.
|
|
||||||
Widgets created after z-sy-h is sourced will work, but will not update the
|
|
||||||
syntax highlighting.
|
syntax highlighting.
|
||||||
|
|
||||||
In zsh newer than 5.8 (not including 5.8 itself),
|
|
||||||
zsh-syntax-highlighting uses the `add-zle-hook-widget` facility to install
|
|
||||||
a `zle-line-pre-redraw` hook. Hooks are run in order of registration,
|
|
||||||
therefore, z-sy-h must be sourced (and register its hook) after anything else
|
|
||||||
that adds hooks that modify the command-line buffer.
|
|
||||||
|
|
||||||
### Does syntax highlighting work during incremental history search?
|
### Does syntax highlighting work during incremental history search?
|
||||||
|
|
||||||
Highlighting the command line during an incremental history search (by default bound to
|
Highlighting the command line during an incremental history search (by default bound to
|
||||||
@ -73,7 +56,7 @@ enough information to allow computing the highlighting correctly.)
|
|||||||
|
|
||||||
See issues [#288][i288] and [#415][i415] for details.
|
See issues [#288][i288] and [#415][i415] for details.
|
||||||
|
|
||||||
[zshzle-Character-Highlighting]: https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
[zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
||||||
[i288]: https://github.com/zsh-users/zsh-syntax-highlighting/pull/288
|
[i288]: https://github.com/zsh-users/zsh-syntax-highlighting/pull/288
|
||||||
[i415]: https://github.com/zsh-users/zsh-syntax-highlighting/pull/415
|
[i415]: https://github.com/zsh-users/zsh-syntax-highlighting/pull/415
|
||||||
|
|
||||||
@ -93,5 +76,5 @@ Syntax highlighting is done by pluggable highlighter scripts. See the
|
|||||||
[documentation on highlighters](docs/highlighters.md) for details and
|
[documentation on highlighters](docs/highlighters.md) for details and
|
||||||
configuration settings.
|
configuration settings.
|
||||||
|
|
||||||
[build-status]: https://github.com/zsh-users/zsh-syntax-highlighting/actions
|
[build-status-image]: https://travis-ci.org/zsh-users/zsh-syntax-highlighting.svg?branch=master
|
||||||
[build-status-image]: https://github.com/zsh-users/zsh-syntax-highlighting/workflows/Tests/badge.svg
|
[build-status-travis]: https://travis-ci.org/zsh-users/zsh-syntax-highlighting
|
||||||
|
255
changelog.md
255
changelog.md
@ -1,244 +1,7 @@
|
|||||||
# Changes in HEAD
|
|
||||||
|
|
||||||
|
|
||||||
- Highlight `&>` `>&|` `>&!` `&>|` and `&>!` as redirection.
|
|
||||||
[#942]
|
|
||||||
|
|
||||||
|
|
||||||
# Changes in 0.8.0
|
|
||||||
|
|
||||||
This is a stable bugfix and feature release. Major new features and changes include:
|
|
||||||
|
|
||||||
|
|
||||||
## Changes fixed as part of the switch to zle-line-pre-redraw
|
|
||||||
|
|
||||||
The changes in this section were fixed by switching to a `zle-line-pre-redraw`-based
|
|
||||||
implementation.
|
|
||||||
|
|
||||||
Note: The new implementation will only be used on future zsh releases,
|
|
||||||
numbered 5.8.1.1 and newer, due to interoperability issues with other plugins
|
|
||||||
(issues #418 and #579). The underlying zsh feature has been available since
|
|
||||||
zsh 5.3.
|
|
||||||
|
|
||||||
Whilst under development, the new implementation was known as the
|
|
||||||
"feature/redrawhook" topic branch.
|
|
||||||
|
|
||||||
- Fixed: Highlighting not triggered after popping a buffer from the buffer stack
|
|
||||||
(using the `push-line` widget, default binding: `M-q`)
|
|
||||||
[#40]
|
|
||||||
|
|
||||||
- Fixed: Invoking completion when there were no matches removed highlighting
|
|
||||||
[#90, #470]
|
|
||||||
|
|
||||||
- Fixed: Two successive deletes followed by a yank only yanked the latest
|
|
||||||
delete, rather than both of them
|
|
||||||
[#150, #151, #160; cf. #183]
|
|
||||||
|
|
||||||
- Presumed fixed: Completing `$(xsel)` results in an error message from `xsel`,
|
|
||||||
with pre-2017 versions of `xsel`. (For 2017 vintage and newer, see the issue
|
|
||||||
for details.)
|
|
||||||
[#154]
|
|
||||||
|
|
||||||
- Fixed: When the standard `bracketed-paste-magic` widget is in use, pastes were slow
|
|
||||||
[#295]
|
|
||||||
|
|
||||||
- Fixed: No way to prevent a widget from being wrapped
|
|
||||||
[#324]
|
|
||||||
|
|
||||||
- Fixed: No highlighting while cycling menu completion
|
|
||||||
[#375]
|
|
||||||
|
|
||||||
- Fixed: Does not coexist with the `IGNORE_EOF` option
|
|
||||||
[#377]
|
|
||||||
|
|
||||||
- Fixed: The `undefined-key` widget was wrapped
|
|
||||||
[#421]
|
|
||||||
|
|
||||||
- Fixed: Does not coexist with the standard `surround` family of widgets
|
|
||||||
[#520]
|
|
||||||
|
|
||||||
- Fixed: First completed filename doesn't get `path` highlighting
|
|
||||||
[#632]
|
|
||||||
|
|
||||||
|
|
||||||
## Other changes
|
|
||||||
|
|
||||||
- Add issue #712 to the previous release's changelog (hereinafter).
|
|
||||||
|
|
||||||
- Fix highlighting when using an alias twice inside another alias
|
|
||||||
[#769, #775]
|
|
||||||
|
|
||||||
- Remove lint warning for `env` followed by a pipe
|
|
||||||
[#797]
|
|
||||||
|
|
||||||
- Recognize `proxychains` as a precommand
|
|
||||||
[#814, #914]
|
|
||||||
|
|
||||||
- Honor shwordsplit when expanding parameters
|
|
||||||
[#687, #818]
|
|
||||||
|
|
||||||
- Skip highlighting when keys are still pending in more cases
|
|
||||||
[#835]
|
|
||||||
|
|
||||||
- Recognize `grc` as a precommand
|
|
||||||
|
|
||||||
- Recognize `torsocks` and `torift` as precommands
|
|
||||||
[#898]
|
|
||||||
|
|
||||||
- Recognize `cpulimit` as a precommand
|
|
||||||
[#897]
|
|
||||||
|
|
||||||
- Recognize `ktrace` as a precommand
|
|
||||||
|
|
||||||
|
|
||||||
# Changes in 0.8.0-alpha1-pre-redrawhook
|
|
||||||
|
|
||||||
## Notice about an improbable-but-not-impossible forward incompatibility
|
|
||||||
|
|
||||||
Everyone can probably skip this section.
|
|
||||||
|
|
||||||
The `master` branch of zsh-syntax-highlighting uses a zsh feature that has not
|
|
||||||
yet appeared in a zsh release: the `memo=` feature, added to zsh in commit
|
|
||||||
zsh-5.8-172-gdd6e702ee (after zsh 5.8, before zsh 5.9). In the unlikely event
|
|
||||||
that this zsh feature should change in an incompatible way before the next
|
|
||||||
stable zsh release, set `zsh_highlight__memo_feature=0` in your .zshrc files to
|
|
||||||
disable use of the new feature.
|
|
||||||
|
|
||||||
z-sy-h dogfoods the new, unreleased zsh feature because that feature was
|
|
||||||
added to zsh at z-sy-h's initiative. The new feature is used in the fix
|
|
||||||
to issue #418.
|
|
||||||
|
|
||||||
|
|
||||||
## Incompatible changes:
|
|
||||||
|
|
||||||
- An unsuccessful completion (a <kbd>⮀ Tab</kbd> press that doesn't change the
|
|
||||||
command line) no longer causes highlighting to be lost. Visual feedback can
|
|
||||||
alternatively be achieved by setting the `format` zstyle under the `warnings`
|
|
||||||
tag, for example,
|
|
||||||
|
|
||||||
zstyle ':completion:*:warnings' format '%F{red}No matches%f'
|
|
||||||
|
|
||||||
Refer to the [description of the `format` style in `zshcompsys(1)`]
|
|
||||||
[zshcompsys-Standard-Styles-format].
|
|
||||||
|
|
||||||
(#90, part of #245 (feature/redrawhook))
|
|
||||||
|
|
||||||
[zshcompsys-Standard-Styles]: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Standard-Styles
|
|
||||||
[zshcompsys-Standard-Styles-format]: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#index-format_002c-completion-style
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Other changes:
|
|
||||||
|
|
||||||
- Document `$ZSH_HIGHLIGHT_MAXLENGTH`.
|
|
||||||
[#698]
|
|
||||||
|
|
||||||
- Optimize highlighting unquoted words (words that are not in single quotes, double quotes, backticks, or dollar-single-quotes)
|
|
||||||
[#730]
|
|
||||||
|
|
||||||
- Redirection operators (e.g., `<` and `>`) are now highlighted by default
|
|
||||||
[#646]
|
|
||||||
|
|
||||||
- Propertly terminate `noglob` scope in try/always blocks
|
|
||||||
[#577]
|
|
||||||
|
|
||||||
- Don't error out when `KSH_ARRAYS` is set in the calling scope
|
|
||||||
[#622, #689]
|
|
||||||
|
|
||||||
- Literal semicolons in array assignments (`foo=( bar ; baz )`) are now
|
|
||||||
highlighted as errors.
|
|
||||||
[3ca93f864fb6]
|
|
||||||
|
|
||||||
- Command separators in array assignments (`foo=( bar | baz )`) are now
|
|
||||||
highlighted as errors.
|
|
||||||
[#651, 81267ca3130c]
|
|
||||||
|
|
||||||
- Support parameter elision in command position (e.g., `$foo ls` where `$foo` is unset or empty)
|
|
||||||
[#667]
|
|
||||||
|
|
||||||
- Don't consider the filename in `sudo -e /path/to/file` to be a command position
|
|
||||||
[#678]
|
|
||||||
|
|
||||||
- Don't look up absolute directory names in $cdpath
|
|
||||||
[2cc2583f8f12, part of #669]
|
|
||||||
|
|
||||||
- Fix `exec 2>&1;` being highlighted as an error.
|
|
||||||
[#676]
|
|
||||||
|
|
||||||
- Fix `: $(<*)` being highlighted as globbing.
|
|
||||||
[#582]
|
|
||||||
|
|
||||||
- Fix `cat < *` being highlighting as globbing when the `MULTIOS` option is unset.
|
|
||||||
[#583]
|
|
||||||
|
|
||||||
- Fix `echo >&2` highlighting the `2` as a filename if a file by that name happened to exist
|
|
||||||
[#694, part of #645]
|
|
||||||
|
|
||||||
- Fix `echo >&-` highlighting the `-` as a filename if a file by that name happened to exist
|
|
||||||
[part of #645]
|
|
||||||
|
|
||||||
- Fix `echo >&p` highlighting the `p` as a filename if a file by that name happened to exist
|
|
||||||
[part of #645]
|
|
||||||
|
|
||||||
- Fix wrong highlighting of unquoted parameter expansions under zsh 5.2 and older
|
|
||||||
[e165f18c758e]
|
|
||||||
|
|
||||||
- Highlight global aliases
|
|
||||||
[#700]
|
|
||||||
|
|
||||||
- Highlight `: =nosuchcommand' as an error (when the `EQUALS` option hasn't been unset).
|
|
||||||
[#430]
|
|
||||||
|
|
||||||
- Highlight reserved word after assignments as errors (e.g., `foo=bar (ls;)`)
|
|
||||||
[#461]
|
|
||||||
|
|
||||||
- Correctly highlight `[[ foo && bar || baz ]]`.
|
|
||||||
|
|
||||||
- Highlight non-executable files in command position correctly (e.g., `% /etc/passwd`)
|
|
||||||
[#202, #669]
|
|
||||||
|
|
||||||
- Highlight directories in command position correctly, including `AUTO_CD` support
|
|
||||||
[#669]
|
|
||||||
|
|
||||||
- Recognize `env` as a precommand (e.g., `env FOO=bar ls`)
|
|
||||||
|
|
||||||
- Recognize `ionice` as a precommand
|
|
||||||
|
|
||||||
- Recognize `strace` as a precommand
|
|
||||||
|
|
||||||
- Fix an error message on stderr before every prompt when the `WARN_NESTED_VAR` zsh option is set:
|
|
||||||
`_zsh_highlight_main__precmd_hook:1: array parameter _zsh_highlight_main__command_type_cache set in enclosing scope in function _zsh_highlight_main__precmd_hook`
|
|
||||||
[#727, #731, #732, #733]
|
|
||||||
|
|
||||||
- Fix highlighting of alias whose definitions use a simple command terminator
|
|
||||||
(such as `;`, `|`, `&&`) before a newline
|
|
||||||
[#677; had regressed in 0.7.0]
|
|
||||||
|
|
||||||
- Highlight arithmetic expansions (e.g., `$(( 42 ))`)
|
|
||||||
[#607 #649 #704]
|
|
||||||
|
|
||||||
- Highlight the parentheses of array assignments as reserved words (`foo=( bar )`).
|
|
||||||
The `assign` style remains supported and has precedence.
|
|
||||||
[#585]
|
|
||||||
|
|
||||||
- Fix interoperability issue with other plugins that use highlighting. The fix
|
|
||||||
requires zsh 5.8.0.3 or newer. (zsh 5.8.0.2-dev from the `master` branch,
|
|
||||||
revision zsh-5.8-172-gdd6e702ee or newer is also fine.)
|
|
||||||
[#418, https://github.com/okapia/zsh-viexchange/issues/1]
|
|
||||||
|
|
||||||
- Improve performance of the `brackets` highlighter.
|
|
||||||
|
|
||||||
- Fix highlighting of pre-command redirections (e.g., the `$fn` in `<$fn cat`)
|
|
||||||
[#712]
|
|
||||||
|
|
||||||
|
|
||||||
# Changes in version 0.7.1
|
|
||||||
|
|
||||||
- Remove out-of-date information from the 0.7.0 changelog.
|
|
||||||
|
|
||||||
|
|
||||||
# Changes in version 0.7.0
|
# Changes in version 0.7.0
|
||||||
|
|
||||||
|
**Version 0.7.0 has not been released. This changelog is a work in progress.**
|
||||||
|
|
||||||
This is a stable bugfix and feature release. Major new features and changes include:
|
This is a stable bugfix and feature release. Major new features and changes include:
|
||||||
|
|
||||||
- Add `ZSH_HIGHLIGHT_DIRS_BLACKLIST` to disable "path" and "path prefix"
|
- Add `ZSH_HIGHLIGHT_DIRS_BLACKLIST` to disable "path" and "path prefix"
|
||||||
@ -269,7 +32,7 @@ This is a stable bugfix and feature release. Major new features and changes inc
|
|||||||
|
|
||||||
- Highlight numeric globs (e.g., `echo /lib<->`)
|
- Highlight numeric globs (e.g., `echo /lib<->`)
|
||||||
|
|
||||||
- Assorted improvements to aliases highlighting
|
- Assorted improvement to aliases highlighting
|
||||||
(e.g.,
|
(e.g.,
|
||||||
`alias sudo_u='sudo -u'; sudo_u jrandom ls`,
|
`alias sudo_u='sudo -u'; sudo_u jrandom ls`,
|
||||||
`alias x=y y=z z=nosuchcommand; x`,
|
`alias x=y y=z z=nosuchcommand; x`,
|
||||||
@ -307,7 +70,13 @@ Known issues include:
|
|||||||
before a newline will incorrectly be highlighted as an error. See issue #677
|
before a newline will incorrectly be highlighted as an error. See issue #677
|
||||||
for examples and workarounds.
|
for examples and workarounds.
|
||||||
[#677]
|
[#677]
|
||||||
[UPDATE: Fixed in 0.8.0]
|
|
||||||
|
- Use of a simple parameter expansion (`${foo}` with nothing but a parameter
|
||||||
|
name inside the braces) in command position, when the value of the parameter
|
||||||
|
looks like an assignment (such as after `foo='bar=$(ls)'`), may result in
|
||||||
|
incorrect highlighting and "BUG" messages. As a workaround, the expansion
|
||||||
|
may be nested (`${${foo}}`).
|
||||||
|
[#670]
|
||||||
|
|
||||||
|
|
||||||
# Changes in version 0.6.0
|
# Changes in version 0.6.0
|
||||||
@ -325,7 +94,7 @@ This is a stable release, featuring bugfixes and minor improvements.
|
|||||||
- The `isearch` and `suffix` [`$zle_highlight` settings][zshzle-Character-Highlighting].
|
- The `isearch` and `suffix` [`$zle_highlight` settings][zshzle-Character-Highlighting].
|
||||||
(79e4d3d12405, 15db71abd0cc, b56ee542d619; requires zsh 5.3 for `$ISEARCHMATCH_ACTIVE` / `$SUFFIX_ACTIVE` support)
|
(79e4d3d12405, 15db71abd0cc, b56ee542d619; requires zsh 5.3 for `$ISEARCHMATCH_ACTIVE` / `$SUFFIX_ACTIVE` support)
|
||||||
|
|
||||||
[zshzle-Character-Highlighting]: https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
[zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
||||||
|
|
||||||
- Possible history expansions in double-quoted strings.
|
- Possible history expansions in double-quoted strings.
|
||||||
(76ea9e1df316)
|
(76ea9e1df316)
|
||||||
@ -771,7 +540,7 @@ in this area.
|
|||||||
|
|
||||||
## Developer-visible changes:
|
## Developer-visible changes:
|
||||||
|
|
||||||
- Test harness converted to [TAP](https://testanything.org/tap-specification.html) format
|
- Test harness converted to [TAP](http://testanything.org/tap-specification.html) format
|
||||||
(d99aa58aaaef, et seq)
|
(d99aa58aaaef, et seq)
|
||||||
|
|
||||||
- Run each test in a separate subprocess, isolating them from each other
|
- Run each test in a separate subprocess, isolating them from each other
|
||||||
|
@ -3,51 +3,34 @@ zsh-syntax-highlighting / highlighters
|
|||||||
|
|
||||||
Syntax highlighting is done by pluggable highlighters:
|
Syntax highlighting is done by pluggable highlighters:
|
||||||
|
|
||||||
* `main` - the base highlighter, and the only one [active by default][main].
|
* `main` - the base highlighter, and the only one [active by default][1].
|
||||||
* `brackets` - [matches brackets][brackets] and parenthesis.
|
* `brackets` - [matches brackets][2] and parenthesis.
|
||||||
* `pattern` - matches [user-defined patterns][pattern].
|
* `pattern` - matches [user-defined patterns][3].
|
||||||
* `regexp` - matches [user-defined regular expressions][regexp].
|
* `cursor` - matches [the cursor position][4].
|
||||||
* `cursor` - matches [the cursor position][cursor].
|
* `root` - highlights the whole command line [if the current user is root][5].
|
||||||
* `root` - highlights the whole command line [if the current user is root][root].
|
* `line` - applied to [the whole command line][6].
|
||||||
* `line` - applied to [the whole command line][line].
|
|
||||||
|
|
||||||
[main]: highlighters/main.md
|
[1]: highlighters/main.md
|
||||||
[brackets]: highlighters/brackets.md
|
[2]: highlighters/brackets.md
|
||||||
[pattern]: highlighters/pattern.md
|
[3]: highlighters/pattern.md
|
||||||
[regexp]: highlighters/regexp.md
|
[4]: highlighters/cursor.md
|
||||||
[cursor]: highlighters/cursor.md
|
[5]: highlighters/root.md
|
||||||
[root]: highlighters/root.md
|
[6]: highlighters/line.md
|
||||||
[line]: highlighters/line.md
|
|
||||||
|
|
||||||
|
|
||||||
Highlighter-independent settings
|
|
||||||
--------------------------------
|
|
||||||
|
|
||||||
By default, all command lines are highlighted. However, it is possible to
|
|
||||||
prevent command lines longer than a fixed number of characters from being
|
|
||||||
highlighted by setting the variable `${ZSH_HIGHLIGHT_MAXLENGTH}` to the maximum
|
|
||||||
length (in characters) of command lines to be highlighter. This is useful when
|
|
||||||
editing very long command lines (for example, with the [`fned`][fned] utility
|
|
||||||
function). Example:
|
|
||||||
|
|
||||||
[fned]: https://zsh.sourceforge.io/Doc/Release/User-Contributions.html#index-zed
|
|
||||||
|
|
||||||
```zsh
|
|
||||||
ZSH_HIGHLIGHT_MAXLENGTH=512
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
How to activate highlighters
|
How to activate highlighters
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
To activate an highlighter, add it to the `ZSH_HIGHLIGHT_HIGHLIGHTERS` array.
|
To activate an highlighter, add it to the `ZSH_HIGHLIGHT_HIGHLIGHTERS` array in
|
||||||
By default `ZSH_HIGHLIGHT_HIGHLIGHTERS` is `(main)`. For example to activate
|
`~/.zshrc`, for example:
|
||||||
`brackets`, `pattern`, and `cursor` highlighters, in `~/.zshrc` do:
|
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
ZSH_HIGHLIGHT_HIGHLIGHTERS+=(brackets pattern cursor)
|
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
By default, `$ZSH_HIGHLIGHT_HIGHLIGHTERS` is unset and only the `main`
|
||||||
|
highlighter is active.
|
||||||
|
|
||||||
|
|
||||||
How to tweak highlighters
|
How to tweak highlighters
|
||||||
-------------------------
|
-------------------------
|
||||||
@ -59,7 +42,7 @@ same as the syntax of "types of highlighting" of the zsh builtin
|
|||||||
`$zle_highlight` array, which is documented in [the `zshzle(1)` manual
|
`$zle_highlight` array, which is documented in [the `zshzle(1)` manual
|
||||||
page][zshzle-Character-Highlighting].
|
page][zshzle-Character-Highlighting].
|
||||||
|
|
||||||
[zshzle-Character-Highlighting]: https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
[zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
||||||
|
|
||||||
Some highlighters support additional configuration parameters; see each
|
Some highlighters support additional configuration parameters; see each
|
||||||
highlighter's documentation for details and examples.
|
highlighter's documentation for details and examples.
|
||||||
|
@ -28,4 +28,4 @@ The syntax for values is the same as the syntax of "types of highlighting" of
|
|||||||
the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
|
the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
|
||||||
manual page][zshzle-Character-Highlighting].
|
manual page][zshzle-Character-Highlighting].
|
||||||
|
|
||||||
[zshzle-Character-Highlighting]: https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
[zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
||||||
|
@ -21,4 +21,4 @@ The syntax for values is the same as the syntax of "types of highlighting" of
|
|||||||
the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
|
the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
|
||||||
manual page][zshzle-Character-Highlighting].
|
manual page][zshzle-Character-Highlighting].
|
||||||
|
|
||||||
[zshzle-Character-Highlighting]: https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
[zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
||||||
|
@ -21,4 +21,4 @@ The syntax for values is the same as the syntax of "types of highlighting" of
|
|||||||
the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
|
the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
|
||||||
manual page][zshzle-Character-Highlighting].
|
manual page][zshzle-Character-Highlighting].
|
||||||
|
|
||||||
[zshzle-Character-Highlighting]: https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
[zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
||||||
|
@ -20,14 +20,12 @@ This highlighter defines the following styles:
|
|||||||
* `reserved-word` - shell reserved words (`if`, `for`)
|
* `reserved-word` - shell reserved words (`if`, `for`)
|
||||||
* `alias` - aliases
|
* `alias` - aliases
|
||||||
* `suffix-alias` - suffix aliases (requires zsh 5.1.1 or newer)
|
* `suffix-alias` - suffix aliases (requires zsh 5.1.1 or newer)
|
||||||
* `global-alias` - global aliases
|
|
||||||
* `builtin` - shell builtin commands (`shift`, `pwd`, `zstyle`)
|
* `builtin` - shell builtin commands (`shift`, `pwd`, `zstyle`)
|
||||||
* `function` - function names
|
* `function` - function names
|
||||||
* `command` - command names
|
* `command` - command names
|
||||||
* `precommand` - precommand modifiers (e.g., `noglob`, `builtin`)
|
* `precommand` - precommand modifiers (e.g., `noglob`, `builtin`)
|
||||||
* `commandseparator` - command separation tokens (`;`, `&&`)
|
* `commandseparator` - command separation tokens (`;`, `&&`)
|
||||||
* `hashed-command` - hashed commands
|
* `hashed-command` - hashed commands
|
||||||
* `autodirectory` - a directory name in command position when the `AUTO_CD` option is set
|
|
||||||
* `path` - existing filenames
|
* `path` - existing filenames
|
||||||
* `path_pathseparator` - path separators in filenames (`/`); if unset, `path` is used (default)
|
* `path_pathseparator` - path separators in filenames (`/`); if unset, `path` is used (default)
|
||||||
* `path_prefix` - prefixes of existing filenames
|
* `path_prefix` - prefixes of existing filenames
|
||||||
@ -42,7 +40,6 @@ This highlighter defines the following styles:
|
|||||||
* `command-substitution-delimiter-quoted` - a quoted command substitution delimiters (`"$(` and `)"`)
|
* `command-substitution-delimiter-quoted` - a quoted command substitution delimiters (`"$(` and `)"`)
|
||||||
* `process-substitution` - process substitutions (`<(echo foo)`)
|
* `process-substitution` - process substitutions (`<(echo foo)`)
|
||||||
* `process-substitution-delimiter` - process substitution delimiters (`<(` and `)`)
|
* `process-substitution-delimiter` - process substitution delimiters (`<(` and `)`)
|
||||||
* `arithmetic-expansion` - arithmetic expansion `$(( 42 ))`)
|
|
||||||
* `single-hyphen-option` - single-hyphen options (`-o`)
|
* `single-hyphen-option` - single-hyphen options (`-o`)
|
||||||
* `double-hyphen-option` - double-hyphen options (`--option`)
|
* `double-hyphen-option` - double-hyphen options (`--option`)
|
||||||
* `back-quoted-argument` - backtick command substitution (`` `foo` ``)
|
* `back-quoted-argument` - backtick command substitution (`` `foo` ``)
|
||||||
@ -61,9 +58,7 @@ This highlighter defines the following styles:
|
|||||||
* `assign` - parameter assignments (`x=foo` and `x=( )`)
|
* `assign` - parameter assignments (`x=foo` and `x=( )`)
|
||||||
* `redirection` - redirection operators (`<`, `>`, etc)
|
* `redirection` - redirection operators (`<`, `>`, etc)
|
||||||
* `comment` - comments, when `setopt INTERACTIVE_COMMENTS` is in effect (`echo # foo`)
|
* `comment` - comments, when `setopt INTERACTIVE_COMMENTS` is in effect (`echo # foo`)
|
||||||
* `comment` - elided parameters in command position (`$x ls` when `$x` is unset or empty)
|
* `named-fd` - named file descriptor (`echo foo {fd}>&2`)
|
||||||
* `named-fd` - named file descriptor (the `fd` in `echo foo {fd}>&2`)
|
|
||||||
* `numeric-fd` - numeric file descriptor (the `2` in `echo foo {fd}>&2`)
|
|
||||||
* `arg0` - a command word other than one of those enumerated above (other than a command, precommand, alias, function, or shell builtin command).
|
* `arg0` - a command word other than one of those enumerated above (other than a command, precommand, alias, function, or shell builtin command).
|
||||||
* `default` - everything else
|
* `default` - everything else
|
||||||
|
|
||||||
@ -116,6 +111,6 @@ of that (new) kind will be highlighted by the style `arg0_$kind`,
|
|||||||
where `$kind` is the output of `type -w` on the new kind of command word. If that
|
where `$kind` is the output of `type -w` on the new kind of command word. If that
|
||||||
style is not defined, then the style `arg0` will be used instead.
|
style is not defined, then the style `arg0` will be used instead.
|
||||||
|
|
||||||
[zshmisc-Simple-Commands-And-Pipelines]: https://zsh.sourceforge.io/Doc/Release/Shell-Grammar.html#Simple-Commands-_0026-Pipelines
|
[zshmisc-Simple-Commands-And-Pipelines]: http://zsh.sourceforge.net/Doc/Release/Shell-Grammar.html#Simple-Commands-_0026-Pipelines
|
||||||
|
|
||||||
[zshzle-Character-Highlighting]: https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
[zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
||||||
|
@ -21,4 +21,4 @@ The syntax for values is the same as the syntax of "types of highlighting" of
|
|||||||
the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
|
the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
|
||||||
manual page][zshzle-Character-Highlighting].
|
manual page][zshzle-Character-Highlighting].
|
||||||
|
|
||||||
[zshzle-Character-Highlighting]: https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
[zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
||||||
|
@ -11,45 +11,12 @@ To use this highlighter, associate regular expressions with styles in the
|
|||||||
`ZSH_HIGHLIGHT_REGEXP` associative array, for example in `~/.zshrc`:
|
`ZSH_HIGHLIGHT_REGEXP` associative array, for example in `~/.zshrc`:
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
typeset -A ZSH_HIGHLIGHT_REGEXP
|
typeset -A ZSH_HIGHLIGHT_PATTERNS
|
||||||
ZSH_HIGHLIGHT_REGEXP+=('^rm .*' fg=red,bold)
|
|
||||||
```
|
|
||||||
|
|
||||||
This will highlight lines that start with a call to the `rm` command.
|
|
||||||
|
|
||||||
The regular expressions flavour used is [PCRE][pcresyntax] when the
|
|
||||||
`RE_MATCH_PCRE` option is set and POSIX Extended Regular Expressions (ERE),
|
|
||||||
as implemented by the platform's C library, otherwise. For details on the
|
|
||||||
latter, see [the `zsh/regex` module's documentation][MAN_ZSH_REGEX] and the
|
|
||||||
`regcomp(3)` and `re_format(7)` manual pages on your system.
|
|
||||||
|
|
||||||
For instance, to highlight `sudo` only as a complete word, i.e., `sudo cmd`,
|
|
||||||
but not `sudoedit`, one might use:
|
|
||||||
|
|
||||||
* When the `RE_MATCH_PCRE` is set:
|
|
||||||
|
|
||||||
```zsh
|
|
||||||
typeset -A ZSH_HIGHLIGHT_REGEXP
|
|
||||||
ZSH_HIGHLIGHT_REGEXP+=('\bsudo\b' fg=123,bold)
|
ZSH_HIGHLIGHT_REGEXP+=('\bsudo\b' fg=123,bold)
|
||||||
```
|
```
|
||||||
|
|
||||||
* When the `RE_MATCH_PCRE` is unset, on platforms with GNU `libc` (e.g., many GNU/Linux distributions):
|
This will highlight "sudo" only as a complete word, i.e., "sudo cmd", but not
|
||||||
|
"sudoedit"
|
||||||
```zsh
|
|
||||||
typeset -A ZSH_HIGHLIGHT_REGEXP
|
|
||||||
ZSH_HIGHLIGHT_REGEXP+=('\<sudo\>' fg=123,bold)
|
|
||||||
```
|
|
||||||
|
|
||||||
* When the `RE_MATCH_PCRE` is unset, on BSD-based platforms (e.g., macOS):
|
|
||||||
|
|
||||||
```zsh
|
|
||||||
typeset -A ZSH_HIGHLIGHT_REGEXP
|
|
||||||
ZSH_HIGHLIGHT_REGEXP+=('[[:<:]]sudo[[:>:]]' fg=123,bold)
|
|
||||||
```
|
|
||||||
|
|
||||||
Note, however, that PCRE and POSIX ERE have a large common subset:
|
|
||||||
for instance, the regular expressions `[abc]`, `a*`, and `(a|b)` have the same
|
|
||||||
meaning in both flavours.
|
|
||||||
|
|
||||||
The syntax for values is the same as the syntax of "types of highlighting" of
|
The syntax for values is the same as the syntax of "types of highlighting" of
|
||||||
the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
|
the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
|
||||||
@ -58,8 +25,6 @@ manual page][zshzle-Character-Highlighting].
|
|||||||
See also: [regular expressions tutorial][perlretut], zsh regexp operator `=~`
|
See also: [regular expressions tutorial][perlretut], zsh regexp operator `=~`
|
||||||
in [the `zshmisc(1)` manual page][zshmisc-Conditional-Expressions]
|
in [the `zshmisc(1)` manual page][zshmisc-Conditional-Expressions]
|
||||||
|
|
||||||
[zshzle-Character-Highlighting]: https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
[zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
||||||
[perlretut]: https://perldoc.perl.org/perlretut
|
[perlretut]: http://perldoc.perl.org/perlretut.html
|
||||||
[zshmisc-Conditional-Expressions]: https://zsh.sourceforge.io/Doc/Release/Conditional-Expressions.html#Conditional-Expressions
|
[zshmisc-Conditional-Expressions]: http://zsh.sourceforge.net/Doc/Release/Conditional-Expressions.html#Conditional-Expressions
|
||||||
[MAN_ZSH_REGEX]: https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-zsh_002fregex-Module
|
|
||||||
[pcresyntax]: https://www.pcre.org/original/doc/html/pcresyntax.html
|
|
||||||
|
@ -22,4 +22,4 @@ The syntax for values is the same as the syntax of "types of highlighting" of
|
|||||||
the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
|
the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
|
||||||
manual page][zshzle-Character-Highlighting].
|
manual page][zshzle-Character-Highlighting].
|
||||||
|
|
||||||
[zshzle-Character-Highlighting]: https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
[zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
||||||
|
@ -51,9 +51,8 @@ _zsh_highlight_highlighter_brackets_paint()
|
|||||||
local -A levelpos lastoflevel matching
|
local -A levelpos lastoflevel matching
|
||||||
|
|
||||||
# Find all brackets and remember which one is matching
|
# Find all brackets and remember which one is matching
|
||||||
pos=0
|
for (( pos = 1; pos <= buflen; pos++ )) ; do
|
||||||
for char in ${(s..)BUFFER} ; do
|
char=$BUFFER[pos]
|
||||||
(( ++pos ))
|
|
||||||
case $char in
|
case $char in
|
||||||
["([{"])
|
["([{"])
|
||||||
levelpos[$pos]=$((++level))
|
levelpos[$pos]=$((++level))
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -31,5 +31,5 @@
|
|||||||
BUFFER=$'/'
|
BUFFER=$'/'
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 1 path_prefix' # /
|
'1 1 path' # /
|
||||||
)
|
)
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
setopt autocd
|
|
||||||
BUFFER=$'/'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 autodirectory' # /
|
|
||||||
)
|
|
@ -28,10 +28,8 @@
|
|||||||
# vim: ft=zsh sw=2 ts=2 et
|
# vim: ft=zsh sw=2 ts=2 et
|
||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
BUFFER=$'/bin; /bin'
|
BUFFER=$'/bin'
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 4 unknown-token' # /bin (in middle)
|
'1 4 path' # /bin
|
||||||
'5 5 commandseparator' # ;
|
|
||||||
'7 10 path_prefix' # /bin (at end)
|
|
||||||
)
|
)
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
setopt autocd
|
|
||||||
BUFFER=$'/bin; /bin'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 4 autodirectory' # /bin (in middle)
|
|
||||||
'5 5 commandseparator' # ;
|
|
||||||
'7 10 autodirectory' # /bin (at end)
|
|
||||||
)
|
|
@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2021 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Have to use cat here as it must be a command that exists.
|
|
||||||
# Otherwise, the test would fail with the first token being recognized
|
|
||||||
# as an "unknown-token".
|
|
||||||
alias ]=cat
|
|
||||||
|
|
||||||
BUFFER='] /'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 alias' # ]
|
|
||||||
'3 3 path' # /
|
|
||||||
)
|
|
@ -27,11 +27,11 @@
|
|||||||
# vim: ft=zsh sw=2 ts=2 et
|
# vim: ft=zsh sw=2 ts=2 et
|
||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# see alias-comment2.zsh and comment-followed.zsh
|
# see alias-comment2.zsh
|
||||||
setopt interactivecomments
|
setopt interactivecomments
|
||||||
alias x=$'# foo\npwd'
|
alias x=$'# foo\npwd'
|
||||||
BUFFER='x'
|
BUFFER='x'
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 1 alias' # x
|
'1 1 alias "issue #616"' # x
|
||||||
)
|
)
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2019 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
alias p='print -r --'
|
|
||||||
|
|
||||||
BUFFER=$'s=$(p foo)'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 10 assign' # s=$(p foo)
|
|
||||||
'3 10 default' # $(p foo)
|
|
||||||
'3 10 command-substitution-unquoted' # $(p foo)
|
|
||||||
'3 4 command-substitution-delimiter-unquoted' # $(
|
|
||||||
'5 5 alias' # p
|
|
||||||
'7 9 default' # foo
|
|
||||||
'10 10 command-substitution-delimiter-unquoted' # )
|
|
||||||
)
|
|
@ -28,16 +28,12 @@
|
|||||||
# vim: ft=zsh sw=2 ts=2 et
|
# vim: ft=zsh sw=2 ts=2 et
|
||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
function b() {} # beware of ALIAS_FUNC_DEF
|
|
||||||
alias a=b b=c c=b
|
alias a=b b=c c=b
|
||||||
|
|
||||||
BUFFER='a foo; :'
|
BUFFER='a foo; :'
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
# An alias is ineligible for expansion whilst it's being expanded.
|
'1 1 unknown-token' # a (invalid alias loop)
|
||||||
# Therefore, the "b" in the expansion of the alias "c" is not considered
|
|
||||||
# as an alias.
|
|
||||||
'1 1 alias' # a
|
|
||||||
'3 5 default' # foo
|
'3 5 default' # foo
|
||||||
'6 6 commandseparator' # ;
|
'6 6 commandseparator' # ;
|
||||||
'8 8 builtin' # :
|
'8 8 builtin' # :
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
alias a=: b='a | a'
|
|
||||||
|
|
||||||
BUFFER='b | b'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 alias' # b
|
|
||||||
'3 3 commandseparator' # |
|
|
||||||
'5 5 alias' # b
|
|
||||||
)
|
|
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
alias a=: b='a && a'
|
|
||||||
|
|
||||||
BUFFER='b && b'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 alias' # b
|
|
||||||
'3 4 commandseparator' # &&
|
|
||||||
'6 6 alias' # b
|
|
||||||
)
|
|
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
alias a=: b='a; a'
|
|
||||||
|
|
||||||
BUFFER='b; b'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 alias' # b
|
|
||||||
'2 2 commandseparator' # ;
|
|
||||||
'4 4 alias' # b
|
|
||||||
)
|
|
@ -1,42 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
alias a=: b='a $(a)'
|
|
||||||
|
|
||||||
BUFFER='b $(b)'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 alias' # b
|
|
||||||
'3 6 default' # $(b)
|
|
||||||
'3 6 command-substitution-unquoted' # $(b)
|
|
||||||
'3 4 command-substitution-delimiter-unquoted' # $(
|
|
||||||
'5 5 alias' # b
|
|
||||||
'6 6 command-substitution-delimiter-unquoted' # )
|
|
||||||
)
|
|
@ -1,43 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
alias a=: b='a < <(a)'
|
|
||||||
|
|
||||||
BUFFER='b < <(b)'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 alias' # b
|
|
||||||
'3 3 redirection' # <
|
|
||||||
'5 8 default' # <(b)
|
|
||||||
'5 8 process-substitution' # <(b)
|
|
||||||
'5 6 process-substitution-delimiter' # <(
|
|
||||||
'7 7 alias' # b
|
|
||||||
'8 8 process-substitution-delimiter' # )
|
|
||||||
)
|
|
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
alias cat='cat | cat'
|
|
||||||
|
|
||||||
BUFFER='cat'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 3 alias' # cat
|
|
||||||
)
|
|
@ -32,5 +32,5 @@ alias x=/
|
|||||||
BUFFER=$'x'
|
BUFFER=$'x'
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 1 unknown-token' # x (/)
|
'1 1 unknown-token "issue #668"' # x (/)
|
||||||
)
|
)
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
setopt autocd
|
|
||||||
alias x=/
|
|
||||||
BUFFER=$'x'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 alias' # x
|
|
||||||
)
|
|
@ -32,7 +32,7 @@ BUFFER=$'{\nls\n} always { pwd }'
|
|||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 1 reserved-word' # {
|
'1 1 reserved-word' # {
|
||||||
'2 2 commandseparator' # \n
|
'2 2 unknown-token' # \n
|
||||||
'3 4 command' # ls
|
'3 4 command' # ls
|
||||||
'5 5 commandseparator' # \n
|
'5 5 commandseparator' # \n
|
||||||
'6 6 reserved-word' # }
|
'6 6 reserved-word' # }
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': $((ls); (ls))'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 15 default' # $((ls); (ls))
|
|
||||||
'3 15 command-substitution-unquoted' # $((ls); (ls))
|
|
||||||
'3 4 command-substitution-delimiter-unquoted' # $(
|
|
||||||
'5 5 reserved-word' # (
|
|
||||||
'6 7 command' # ls
|
|
||||||
'8 8 reserved-word' # )
|
|
||||||
'9 9 commandseparator' # ;
|
|
||||||
'11 11 reserved-word' # (
|
|
||||||
'12 13 command' # ls
|
|
||||||
'14 14 reserved-word' # )
|
|
||||||
'15 15 command-substitution-delimiter-unquoted' # )
|
|
||||||
)
|
|
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': $(( 6 * 9 ))'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 14 default' # $(( 6 * 9 ))
|
|
||||||
'3 14 arithmetic-expansion' # $(( 6 * 9 ))
|
|
||||||
)
|
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': "$(( 6 * 9 ))"'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 16 default' # "$(( 6 * 9 ))"
|
|
||||||
'3 16 double-quoted-argument' # "$(( 6 * 9 ))"
|
|
||||||
'4 15 arithmetic-expansion' # $(( 6 * 9 ))
|
|
||||||
)
|
|
@ -1,42 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': $(( $(echo 2) + 2 ))'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 22 default' # $(( $(echo 2) + 2 ))
|
|
||||||
'3 22 arithmetic-expansion' # $(( $(echo 2) + 2 ))
|
|
||||||
'7 15 command-substitution-quoted' # $(echo 2)
|
|
||||||
'7 8 command-substitution-delimiter-quoted' # $(
|
|
||||||
'9 12 builtin' # echo
|
|
||||||
'14 14 default' # 2
|
|
||||||
'15 15 command-substitution-delimiter' # )
|
|
||||||
)
|
|
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': $(( ((42)) ))'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 15 default' # $(( ((42)) ))
|
|
||||||
'3 15 arithmetic-expansion' # $(( ((42)) ))
|
|
||||||
)
|
|
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': "foo"$(())"bar"'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 17 default' # "foo"$(())"bar"
|
|
||||||
'3 7 double-quoted-argument' # "foo"
|
|
||||||
'8 12 arithmetic-expansion' # $(())
|
|
||||||
'13 17 double-quoted-argument' # "bar"
|
|
||||||
)
|
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': $(( \!\! ))'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 11 default' # $(( !! ))
|
|
||||||
'3 11 arithmetic-expansion' # $(( !! ))
|
|
||||||
'7 8 history-expansion "issue #713"' # !!
|
|
||||||
)
|
|
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': $(( 0 * 1\'\'000 ))'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 19 default' # $(( 0 * 1\'\'000 ))
|
|
||||||
'3 19 arithmetic-expansion' # $(( 0 * 1\'\'000 ))
|
|
||||||
'12 12 unknown-token' # \'
|
|
||||||
'13 13 unknown-token' # \'
|
|
||||||
)
|
|
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': foo*$(( 42 * 1729 ))*bar'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 26 default' # foo*$(( 42 * 1729 ))*bar
|
|
||||||
'6 6 globbing' # *
|
|
||||||
'7 22 arithmetic-expansion' # $(( 42 * 1729 ))
|
|
||||||
'23 23 globbing' # *
|
|
||||||
)
|
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': $(( $(( 1 + 2 )) * 3 ))'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 25 default' # $(( $(( 1 + 2 )) * 3 ))
|
|
||||||
'3 25 arithmetic-expansion' # $(( $(( 1 + 2 )) * 3 ))
|
|
||||||
'7 18 arithmetic-expansion' # $(( 1 + 2 ))
|
|
||||||
)
|
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': "$(( 1 + 1 ))"'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 16 default' # "$(( 1 + 1 ))"
|
|
||||||
'3 16 double-quoted-argument' # "$(( 1 + 1 ))"
|
|
||||||
'4 15 arithmetic-expansion' # $(( 1 + 1 ))
|
|
||||||
)
|
|
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': $(( 1'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 7 default' # $(( 1
|
|
||||||
'3 7 arithmetic-expansion' # $(( 1
|
|
||||||
)
|
|
@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': $(( 1729 )'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 12 default' # $(( 1729 )
|
|
||||||
'3 12 arithmetic-expansion' # $(( 1729 )
|
|
||||||
)
|
|
||||||
|
|
||||||
if [[ ${(z):-'$('} == '$( ' ]]; then # ignore zsh 5.0.8 bug
|
|
||||||
expected_region_highlight[2]='3 13 default' # $(( 1729 )
|
|
||||||
fi
|
|
@ -1,45 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2019 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'a=( foo | bar )'
|
|
||||||
bar(){}
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 3 assign' # a=(
|
|
||||||
'3 3 reserved-word' # (
|
|
||||||
'5 7 default' # foo
|
|
||||||
'9 9 unknown-token' # |
|
|
||||||
# zsh reports a parse error at this point. Nevertheless, we test how we
|
|
||||||
# highlight the remainder of $BUFFER. Currently we recover by treating the pipe
|
|
||||||
# as a command separator. That's not the only reasonable behaviour, though; if
|
|
||||||
# we change the behaviour, we should adjust the following expectations accordingly.
|
|
||||||
'11 13 function' # bar
|
|
||||||
'15 15 unknown-token' # )
|
|
||||||
)
|
|
@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2019 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'a=( foo ; bar )'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 3 assign' # a=(
|
|
||||||
'3 3 reserved-word' # (
|
|
||||||
'5 7 default' # foo
|
|
||||||
'9 9 unknown-token' # ; (not commandseparator; see highlighter source code)
|
|
||||||
'11 13 default' # bar
|
|
||||||
'15 15 assign' # )
|
|
||||||
'15 15 reserved-word' # )
|
|
||||||
)
|
|
@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2019 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'a=( foo \n bar )'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 3 assign' # a=(
|
|
||||||
'3 3 reserved-word' # (
|
|
||||||
'5 7 default' # foo
|
|
||||||
'9 9 commandseparator' # \n
|
|
||||||
'11 13 default' # bar
|
|
||||||
'15 15 assign' # )
|
|
||||||
'15 15 reserved-word' # )
|
|
||||||
)
|
|
@ -31,9 +31,7 @@ BUFFER='a+=(lorem ipsum)'
|
|||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
"1 4 assign" # a+=(
|
"1 4 assign" # a+=(
|
||||||
"4 4 reserved-word" # (
|
|
||||||
"5 9 default" # lorem
|
"5 9 default" # lorem
|
||||||
"11 15 default" # ipsum
|
"11 15 default" # ipsum
|
||||||
"16 16 assign" # )
|
"16 16 assign" # )
|
||||||
"16 16 reserved-word" # )
|
|
||||||
)
|
)
|
||||||
|
@ -32,10 +32,8 @@ BUFFER='(A=(hello world))'
|
|||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
"1 1 reserved-word" # (
|
"1 1 reserved-word" # (
|
||||||
"2 4 assign" # A=(
|
"2 4 assign" # A=(
|
||||||
"4 4 reserved-word" # (
|
|
||||||
"5 9 default" # hello
|
"5 9 default" # hello
|
||||||
"11 15 default" # world
|
"11 15 default" # world
|
||||||
"16 16 assign" # )
|
"16 16 assign" # )
|
||||||
"16 16 reserved-word" # )
|
|
||||||
"17 17 reserved-word" # )
|
"17 17 reserved-word" # )
|
||||||
)
|
)
|
||||||
|
@ -31,10 +31,8 @@ BUFFER='A=(hello world) ls'
|
|||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
"1 3 assign" # A=(
|
"1 3 assign" # A=(
|
||||||
"3 3 reserved-word" # (
|
|
||||||
"4 8 default" # hello
|
"4 8 default" # hello
|
||||||
"10 14 default" # world
|
"10 14 default" # world
|
||||||
"15 15 assign" # )
|
"15 15 assign" # )
|
||||||
"15 15 reserved-word" # )
|
|
||||||
"17 18 command" # ls
|
"17 18 command" # ls
|
||||||
)
|
)
|
||||||
|
@ -31,11 +31,9 @@ BUFFER='A=(hello world) b=42'
|
|||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
"1 3 assign" # A=(
|
"1 3 assign" # A=(
|
||||||
"3 3 reserved-word" # (
|
|
||||||
"4 8 default" # hello
|
"4 8 default" # hello
|
||||||
"10 14 default" # world
|
"10 14 default" # world
|
||||||
"15 15 assign" # )
|
"15 15 assign" # )
|
||||||
"15 15 reserved-word" # )
|
|
||||||
"17 20 assign" # b=42
|
"17 20 assign" # b=42
|
||||||
"19 20 default" # 42
|
"19 20 default" # 42
|
||||||
)
|
)
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'x=y nosuchcommand'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 3 assign' # x=y
|
|
||||||
'3 3 default' # y
|
|
||||||
'5 17 unknown-token' # nosuchcommand
|
|
||||||
)
|
|
@ -1,45 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2018 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'x="$(ls x y z)"'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 15 assign' # x="$(ls x y z)"
|
|
||||||
'3 15 default' # "$(ls x y z)"
|
|
||||||
'3 3 double-quoted-argument' # "
|
|
||||||
'15 15 double-quoted-argument' # "
|
|
||||||
'4 14 command-substitution-quoted' # $(ls x y z)
|
|
||||||
'4 5 command-substitution-delimiter-quoted' # $(
|
|
||||||
'6 7 command' # ls
|
|
||||||
'9 9 default' # x
|
|
||||||
'11 11 default' # y
|
|
||||||
'13 13 default' # z
|
|
||||||
'14 14 command-substitution-delimiter-quoted' # )
|
|
||||||
)
|
|
@ -33,10 +33,8 @@ expected_region_highlight=(
|
|||||||
"1 3 assign" # A=1
|
"1 3 assign" # A=1
|
||||||
"3 3 default" # 1
|
"3 3 default" # 1
|
||||||
"5 7 assign" # b=(
|
"5 7 assign" # b=(
|
||||||
"7 7 reserved-word" # (
|
|
||||||
"8 12 default" # "foo"
|
"8 12 default" # "foo"
|
||||||
"8 12 double-quoted-argument" # "foo"
|
"8 12 double-quoted-argument" # "foo"
|
||||||
"14 16 default" # bar
|
"14 16 default" # bar
|
||||||
"17 17 assign" # )
|
"17 17 assign" # )
|
||||||
"17 17 reserved-word" # )
|
|
||||||
)
|
)
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2017 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'foo=bar { :; }'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 7 assign' # foo=bar
|
|
||||||
'5 7 default' # bar
|
|
||||||
'9 9 unknown-token' # {
|
|
||||||
'11 11 builtin' # :
|
|
||||||
'12 12 commandseparator' # ;
|
|
||||||
'14 14 reserved-word' # }
|
|
||||||
)
|
|
@ -1,40 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2017 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'foo=bar ( :; )'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 7 assign' # foo=bar
|
|
||||||
'5 7 default' # bar
|
|
||||||
'9 9 unknown-token' # (
|
|
||||||
'11 11 builtin' # :
|
|
||||||
'12 12 commandseparator' # ;
|
|
||||||
'14 14 unknown-token' # )
|
|
||||||
)
|
|
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2017 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'foo=bar (( foo ))'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 7 assign' # foo=bar
|
|
||||||
'5 7 default' # bar
|
|
||||||
'9 17 unknown-token' # (( foo ))
|
|
||||||
)
|
|
@ -1,40 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2017 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'foo=bar [[ -n foo ]]'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 7 assign' # foo=bar
|
|
||||||
'5 7 default' # bar
|
|
||||||
'9 10 unknown-token' # [[
|
|
||||||
'12 13 single-hyphen-option' # -n
|
|
||||||
'15 17 default' # foo
|
|
||||||
'19 20 reserved-word' # ]]
|
|
||||||
)
|
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2017 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'foo=bar \! :'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 7 assign' # foo=bar
|
|
||||||
'5 7 default' # bar
|
|
||||||
'9 9 unknown-token' # \!
|
|
||||||
'11 11 builtin' # :
|
|
||||||
)
|
|
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'echo foo\\\nbar"baz"'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 4 builtin' # echo
|
|
||||||
'6 18 default "issue #705"' # foo\\\nbar"baz"
|
|
||||||
'14 18 double-quoted-argument "issue #705"' # "baz"
|
|
||||||
)
|
|
@ -32,11 +32,9 @@ BUFFER=$'foo=(bar abaz) \! ls'
|
|||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 5 assign' # foo=(
|
'1 5 assign' # foo=(
|
||||||
'5 5 reserved-word' # (
|
|
||||||
'6 8 default' # bar
|
'6 8 default' # bar
|
||||||
'10 13 default' # abaz
|
'10 13 default' # abaz
|
||||||
'14 14 assign' # )
|
'14 14 assign' # )
|
||||||
'14 14 reserved-word' # )
|
|
||||||
'16 16 unknown-token' # \!
|
'16 16 unknown-token' # \!
|
||||||
'18 19 command' # ls
|
'18 19 command' # ls
|
||||||
)
|
)
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2022 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'{ a=42 }'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 reserved-word' # {
|
|
||||||
'3 6 assign' # a=42
|
|
||||||
'5 6 default' # 42
|
|
||||||
'8 8 reserved word "issue #854"' # }
|
|
||||||
)
|
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
cdpath=( $PWD )
|
|
||||||
mkdir foo foo/bar
|
|
||||||
|
|
||||||
BUFFER="/foo"
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 4 unknown-token' # x (/)
|
|
||||||
)
|
|
@ -28,12 +28,11 @@
|
|||||||
# vim: ft=zsh sw=2 ts=2 et
|
# vim: ft=zsh sw=2 ts=2 et
|
||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# see alias-comment1.zsh
|
|
||||||
setopt interactivecomments
|
setopt interactivecomments
|
||||||
BUFFER=$'# foo\ntrue'
|
BUFFER=$'# foo\ntrue'
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 5 comment' # # foo
|
'1 5 comment' # # foo
|
||||||
'6 6 commandseparator' # \n
|
'6 6 commandseparator "issue #501"' # \n
|
||||||
'7 10 builtin' # true
|
'7 10 builtin' # true
|
||||||
)
|
)
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'[[ foo && bar || baz ]]'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 2 reserved-word' # [[
|
|
||||||
'4 6 default' # foo
|
|
||||||
'8 9 default' # &&
|
|
||||||
'11 13 default' # bar
|
|
||||||
'15 16 default' # ||
|
|
||||||
'18 20 default' # baz
|
|
||||||
'22 23 reserved-word' # ]]
|
|
||||||
)
|
|
@ -34,6 +34,6 @@ BUFFER=$':;\n:'
|
|||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 1 builtin' # :
|
'1 1 builtin' # :
|
||||||
'2 2 commandseparator' # ;
|
'2 2 commandseparator' # ;
|
||||||
'3 3 commandseparator' # \n
|
'3 3 commandseparator "issue #616"' # \n
|
||||||
'4 4 builtin' # :
|
'4 4 builtin' # :
|
||||||
)
|
)
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': =ls'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 5 path' # =ls
|
|
||||||
)
|
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
unsetopt equals
|
|
||||||
|
|
||||||
BUFFER=$': =nosuchcommand'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 16 default' # =nosuchcommand
|
|
||||||
)
|
|
@ -1,36 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': =nosuchcommand'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 16 unknown-token' # =nosuchcommand
|
|
||||||
)
|
|
@ -1,36 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': ='
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 3 default' # =
|
|
||||||
)
|
|
@ -1,40 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
touch 2
|
|
||||||
|
|
||||||
BUFFER=$'echo foo>&2'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 4 builtin' # echo
|
|
||||||
'6 8 default' # foo
|
|
||||||
'9 10 redirection' # >&
|
|
||||||
'11 11 numeric-fd' # 2 (not path)
|
|
||||||
)
|
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
alias -g foo=bar
|
|
||||||
|
|
||||||
BUFFER=$'foo foo'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 3 global-alias' # foo
|
|
||||||
'5 7 global-alias' # foo
|
|
||||||
)
|
|
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=': !!= "!!="'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 4 history-expansion "issue #713"' # !!
|
|
||||||
'7 11 default' # "!!="
|
|
||||||
'7 11 double-quoted-argument' # "!!="
|
|
||||||
'8 9 history-expansion "issue #713' # !!
|
|
||||||
)
|
|
@ -1,49 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$': $(kill -9 $$) ${:-$(kill -9 $$)}'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 15 default' # $(kill -9 $$)
|
|
||||||
'3 15 command-substitution-unquoted' # $(kill -9 $$)
|
|
||||||
'3 4 command-substitution-delimiter-unquoted' # $(
|
|
||||||
'5 8 builtin' # kill
|
|
||||||
'10 11 single-hyphen-option' # -9
|
|
||||||
'13 14 default' # $$
|
|
||||||
'15 15 command-substitution-delimiter-unquoted' # )
|
|
||||||
'17 34 default' # ${:-$(kill -9 $$)}
|
|
||||||
'21 33 command-substitution-unquoted' # $(kill -9 $$)
|
|
||||||
'21 22 command-substitution-delimiter-unquoted' # $(
|
|
||||||
'23 26 builtin' # kill
|
|
||||||
'28 29 single-hyphen-option' # -9
|
|
||||||
'31 32 default' # $$
|
|
||||||
'33 33 command-substitution-delimiter-unquoted' # )
|
|
||||||
)
|
|
@ -1,40 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# We aren't testing how this is highlighted; we're testing that it's not
|
|
||||||
# evaluated. If it gets evaluated, the test suite will die.
|
|
||||||
BUFFER=$': /(e*exit 42*)'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 15 default' # /(e*exit 42*)
|
|
||||||
'6 6 globbing' # *
|
|
||||||
'14 14 globbing' # *
|
|
||||||
)
|
|
@ -32,10 +32,8 @@ BUFFER=$'foo=(\nbar) env'
|
|||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 5 assign' # foo=(
|
'1 5 assign' # foo=(
|
||||||
'5 5 reserved-word' # (
|
|
||||||
'6 6 commandseparator' # \n
|
'6 6 commandseparator' # \n
|
||||||
'7 9 default' # bar
|
'7 9 default' # bar
|
||||||
'10 10 assign' # )
|
'10 10 assign' # )
|
||||||
'10 10 reserved-word' # )
|
'12 14 command' # env
|
||||||
'12 14 precommand' # env
|
|
||||||
)
|
)
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2018 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
unsetopt multios
|
|
||||||
|
|
||||||
BUFFER=$'cat < *'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 3 command' # cat
|
|
||||||
'5 5 redirection' # <
|
|
||||||
'7 7 default' # * - not globbing
|
|
||||||
)
|
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2018 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'cat < *'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 3 command' # cat
|
|
||||||
'5 5 redirection' # <
|
|
||||||
'7 7 default' # *
|
|
||||||
'7 7 globbing' # *
|
|
||||||
)
|
|
@ -27,7 +27,7 @@
|
|||||||
# vim: ft=zsh sw=2 ts=2 et
|
# vim: ft=zsh sw=2 ts=2 et
|
||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
BUFFER='id bob | grep java | sort | uniq | tail | head'
|
BUFFER='ps aux | grep java | sort | uniq | tail | head'
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
"1 2 command" # ps
|
"1 2 command" # ps
|
||||||
|
@ -39,7 +39,6 @@ expected_region_highlight=(
|
|||||||
'19 24 reserved-word' # always
|
'19 24 reserved-word' # always
|
||||||
'26 26 reserved-word' # {
|
'26 26 reserved-word' # {
|
||||||
'28 31 builtin' # echo
|
'28 31 builtin' # echo
|
||||||
'33 33 default' # *
|
'33 33 globbing "issue #577"' # *
|
||||||
'33 33 globbing' # *
|
|
||||||
'35 35 reserved-word' # }
|
'35 35 reserved-word' # }
|
||||||
)
|
)
|
||||||
|
@ -34,5 +34,5 @@ expected_region_highlight=(
|
|||||||
'1 4 precommand' # exec
|
'1 4 precommand' # exec
|
||||||
'6 6 redirection' # >
|
'6 6 redirection' # >
|
||||||
'7 15 path' # /dev/null
|
'7 15 path' # /dev/null
|
||||||
'16 16 commandseparator' # ;
|
'16 16 commandseparator "issue #676"' # ;
|
||||||
)
|
)
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2021 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER=$'env | grep $needle'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 3 precommand' # env
|
|
||||||
'5 5 commandseparator' # |
|
|
||||||
'7 10 command' # grep
|
|
||||||
'12 18 default' # $needle
|
|
||||||
)
|
|
@ -1,40 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
setopt shwordsplit
|
|
||||||
local EDITOR='ed -s'
|
|
||||||
|
|
||||||
ed() { command ed "$@" }
|
|
||||||
|
|
||||||
BUFFER=$'$EDITOR'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 7 function' # $EDITOR
|
|
||||||
)
|
|
@ -1,43 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2018 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# See getoutput() and getoutputfile() in zsh's C source code.
|
|
||||||
|
|
||||||
BUFFER=$': $(<*)'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 7 default' # $(<*)
|
|
||||||
'3 7 command-substitution-unquoted' # $(<*)
|
|
||||||
'3 4 command-substitution-delimiter-unquoted' # $(
|
|
||||||
'5 5 redirection' # <
|
|
||||||
'6 6 default' # * - not globbing!
|
|
||||||
'7 7 command-substitution-delimiter-unquoted' # )
|
|
||||||
)
|
|
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# This used to be an infinite loop.
|
|
||||||
|
|
||||||
BUFFER=$'l+=( $1'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 4 assign' # l+=(
|
|
||||||
'4 4 reserved-word' # (
|
|
||||||
'6 7 default' # $1
|
|
||||||
)
|
|
@ -1,36 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BUFFER='$x ls'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 2 comment' # $x
|
|
||||||
'4 5 command' # ls
|
|
||||||
)
|
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2021 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
setopt sh_word_split
|
|
||||||
local foo='echo foo'
|
|
||||||
|
|
||||||
BUFFER='$foo'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 4 builtin' # $foo
|
|
||||||
)
|
|
@ -1,42 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
if type global_alias >/dev/null; then
|
|
||||||
skip_test="Test is written on the assumption that 'global_alias' is not a valid command name, but that assumption does not hold"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
alias -g global_alias=y
|
|
||||||
local s=global_alias
|
|
||||||
|
|
||||||
BUFFER=$'$s'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 2 unknown-token' # $s
|
|
||||||
)
|
|
@ -34,7 +34,7 @@
|
|||||||
BUFFER='$PWD; ${PWD}'
|
BUFFER='$PWD; ${PWD}'
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
"1 4 unknown-token" # $PWD (without AUTO_CD)
|
"1 4 path" # $PWD
|
||||||
"5 5 commandseparator" # ;
|
"5 5 commandseparator" # ;
|
||||||
"7 12 path_prefix" # ${PWD}
|
"7 12 path" # ${PWD}
|
||||||
)
|
)
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
setopt autocd
|
|
||||||
BUFFER=$'$PWD; ${PWD}'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 4 autodirectory' # $PWD
|
|
||||||
'5 5 commandseparator' # ;
|
|
||||||
'7 12 autodirectory' # ${PWD}
|
|
||||||
)
|
|
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
touch foo
|
|
||||||
|
|
||||||
BUFFER=$': \'f\'oo'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 1 builtin' # :
|
|
||||||
'3 7 path' # \'f\'oo
|
|
||||||
'3 5 single-quoted-argument' # \'f\'
|
|
||||||
)
|
|
@ -30,7 +30,7 @@
|
|||||||
# Assumes that '/bin/sh' exists and '/bin/s' does not exist.
|
# Assumes that '/bin/sh' exists and '/bin/s' does not exist.
|
||||||
# Related to path_prefix.zsh
|
# Related to path_prefix.zsh
|
||||||
|
|
||||||
PREBUFFER=$'ls \\\n'
|
PREBUFFER='ls \'
|
||||||
BUFFER='/bin/s'
|
BUFFER='/bin/s'
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# Copyright (c) 2020 zsh-syntax-highlighting contributors
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
|
||||||
# provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
|
||||||
# and the following disclaimer.
|
|
||||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer in the documentation and/or other materials provided
|
|
||||||
# with the distribution.
|
|
||||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software without specific prior
|
|
||||||
# written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
||||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
||||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
||||||
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
touch foo
|
|
||||||
chmod -x foo
|
|
||||||
BUFFER=$'./foo; ./foo'
|
|
||||||
|
|
||||||
expected_region_highlight=(
|
|
||||||
'1 5 unknown-token' # ./foo (in middle)
|
|
||||||
'6 6 commandseparator' # ;
|
|
||||||
'8 12 unknown-token' # ./foo (at end)
|
|
||||||
)
|
|
@ -29,12 +29,11 @@
|
|||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
hash sudo=false
|
hash sudo=false
|
||||||
touch foo
|
|
||||||
|
|
||||||
BUFFER='sudo -e ./foo'
|
BUFFER='sudo -e /etc/passwd'
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 4 precommand' # sudo
|
'1 4 precommand' # sudo
|
||||||
'6 7 single-hyphen-option' # -e
|
'6 7 single-hyphen-option' # -e
|
||||||
'9 13 path' # ./foo
|
'9 19 path' # /etc/passwd
|
||||||
)
|
)
|
||||||
|
@ -35,5 +35,5 @@ BUFFER='sudo -e /does/not/exist'
|
|||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 4 precommand' # sudo
|
'1 4 precommand' # sudo
|
||||||
'6 7 single-hyphen-option' # -e
|
'6 7 single-hyphen-option' # -e
|
||||||
'9 23 default' # /does/not/exist
|
'9 23 normal "issue #678"' # /does/not/exist
|
||||||
)
|
)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user