Commit graph

918 commits

Author SHA1 Message Date
Max Coplan 4672ad5dd9
fix(chroma/ssh): treat -R and -Q as flags that take an argument (#91)
Some checks failed
zunit / zunit (push) Has been cancelled
The ssh chroma keeps a list of flags whose argument must be skipped, so the
argument is not mistaken for the hostname. Every entry is hyphenated except
two: `Q` and `R` are written bare, so `-Q` and `-R` never match.

For `-R` the consequence is visible. Typing

    ssh -R 5037:localhost:5037 devbox

leaves `5037:localhost:5037` counted as the first non-option token, so it
becomes the hostname. Its trailing `:5037` then matches the host:port check and
the chroma calls `zle -M` with

    Format of hostname incorrect, use -p to pass port number

while you type, on a command line that is perfectly valid. `-L` is in the list
correctly, so the identical local-forward spec highlights fine and only the
remote forward is affected. `-Q` mislabels its argument as the host in the same
way, without reaching the message.

Adds two tests: `-R` must stay silent, and a hostspec that really does carry a
port must still be reported.

Related to #33, which reports `-LRD` forwarding specs highlighting wrongly;
this fixes the `-R` half.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 09:14:04 +02:00
Quentin Burgess 3d574ccf48
misc(make): trigger new parser only when new shared cache is enabled (#83)
Some checks failed
zunit / zunit (push) Has been cancelled
2025-07-16 12:16:33 +02:00
mrnoname1000 3922b911a3
_chroma/-perl.ch: Support -E flag (#61) 2025-07-16 10:42:14 +02:00
Quentin Burgess 5ecd353c81
feat(chroma/make): new makefile colorization caching strategy (#82)
* fix(chroma/make): huge delay on big units

* fix(fast-make): code-style indentation

* feat(fast-make): allow shared cache

One may enable the shared cache by setting the following prior to
loading the fast-synthax-highlighting module

```sh
typeset -gA FAST_HIGHLIGHT
FAST_HIGHLIGHT[chroma-make-cache-global]=1
```

This new implementation change the way the cached makefile' parsed
content are expired. Prior to this commit, cached item expired after
7s. The new implementation get ride of the timer limit and
replace it with a good old "is my file content's different"
2025-07-16 10:37:53 +02:00
Quentin Burgess dcee72bb99
fix(make): colorize targets from imported make-files (#81)
* fix(make): colorize targets from imported make-files

Old behavior use to parse the content of the invoked `Makefile` unit
to define targets.

Such parsing didn't take into account targets from unit imported by the
current (ex: targets defined in files imported such as `import
./targets/help.mk`).

New behavior pass the content of the Makefile unit post lexing (aka
`make -f Makefile -pn` instead of the plain unit.

* Update →chroma/-make.ch

---------

Co-authored-by: Philipp Schmitt <pschmitt@users.noreply.github.com>
2025-06-25 09:44:25 +02:00
Quentin Burgess 6f57bbe57c
feat(chrome): support for podman (#80) 2025-06-25 09:42:43 +02:00
Ultimator14 cf318e06a9
Add '--message' to git commit syntax highlighting (#57)
Fix zdharma-continuum/fast-syntax-highlighting#47

Signed-off-by: Jan Breig <git@pygos.space>
2023-07-05 23:10:19 +02:00
Lucas Larson 13d7b4e634
add support for goawk (#51)
`goawk` is a POSIX-compliant AWK interpreter that benefits from the
same highlighting as other AWK interpreters here.

Signed-off-by: Lucas Larson <LucasLarson@riseup.net>
2023-04-03 08:58:53 +02:00
Lucas Larson 371591a7b6
avoid errors unbound variables and unset parameters (#50)
zsh prints an abundance of errors when `setopt nounset` is enabled and
fast-syntax-highlighting is activated (#49). This commit helps to avoid
the unnecessary verbosity.

Signed-off-by: Lucas Larson <LucasLarson@riseup.net>
2023-03-24 23:06:05 +01:00
memchr 5521b083f8
feat: whatis recognizes section suffix (#45)
[F-Sy-H](https://github.com/zdharma-continuum/fast-syntax-highlighting) can recognize and highlight manual subsection suffixes (i.e., `open.2`, `ls.1p`, `printf.3`).

- `man-db` is known to support subsection suffixes
- `mandoc` should not be affected by this commit
2023-03-10 16:14:33 -06:00
QuarticCat 7c390ee3bf
fix: correct highlighting logic for global aliases (#26)
Thank you to @QuarticCat for the fix.
2022-11-19 20:50:23 -06:00
Loong Wang 770bcd9866
maint: update links (e.g., zdharma -> zdharma-continuum) (#41)
Authored by: @wangl-cc
2022-09-30 22:22:15 -05:00
Brendan Falk 13dd94ba82
docs: Fig installation instructions (#37) 2022-07-22 17:30:21 -05:00
Francisco Borges 721be2a935
Use 'typeset -g' to avoid warning when WARN_CREATE_GLOBAL is set. (#36) 2022-06-11 11:10:30 +02:00
Guido Cella 370106d95d
feat: new base16 theme (#31)
Author: @guidocella
2022-06-08 02:32:31 -05:00
vladislav doster 9469bd0e7e
maint: add linting Github action workflow (#29)
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
2022-04-25 01:18:04 -05:00
Aloxaf ef8ba84c3a
fix: correct highlighting logic for hex color codes (e.g., #fff & #ffffff) (#18)
- fixes an issue of incorrectly parsing certain strings as hex color codes
2022-02-27 22:19:23 -05:00
Yusei Ueno c8771e436d
docs(README.md): correct link pointing to chromas directory (#19) 2022-02-27 22:02:47 -05:00
vladislav doster 35556c2f83
maint(_chroma/-ssh.ch): don't expand $userdirs for user matching
`$userdirs` can be pretty huge, and blindly expanding it to match as a regex expression
can be expensive.

Because `$userdirs` is an associative array, leveraging direct member lookup is the optimal method.
2022-02-27 21:55:37 -05:00
Marek Rusinowski 8064150eee -ssh.sh: don't expand $userdirs for user matching
$userdirs can be quite huge and blindly expanding it to then match as regexp
can be very expensive. Because $userdirs is an associative array, we can do
a direct member lookup which is much quicker.
2022-01-31 22:09:40 +01:00
Aaron Lichtman 585c089968
Merge pull request #10 from zdharma-continuum/ci-pinned-versions 2021-11-13 20:27:09 -06:00
Philipp Schmitt 6f36339a31
Pin zunit, revolver and color.zsh versions 2021-11-13 18:23:36 +01:00
Aaron Lichtman db6d265db0
Merge pull request #9 from zdharma-continuum/ci 2021-11-13 10:44:42 -06:00
Philipp Schmitt 5327d7f9c0
Remove travic CI config 2021-11-12 23:29:57 +01:00
Philipp Schmitt 41fe53aa00
Unit tests via GH Actions 2021-11-12 23:29:04 +01:00
Alexandros Kozák f4d007e4da
Restore compatibility with Zsh v4.3.11 (#7) 2021-11-12 18:41:38 +01:00
Philipp Schmitt 47f1ce7a32
Merge pull request #6 from zdharma-continuum/gitter-im 2021-11-12 18:11:36 +01:00
Philipp Schmitt 84c7e50f12
Merge pull request #3 from agkozak/exit-code 2021-11-11 15:56:57 +01:00
Alexandros Kozak 31107990dc Change : to true 2021-11-11 06:43:43 -08:00
Philipp Schmitt 8fc2b8b9a7
Update TOC 2021-11-11 15:23:58 +01:00
Philipp Schmitt 1bf99ed4cd
Replace IRC with gitter.im badge
https://github.com/zdharma-continuum/zinit/issues/29
2021-11-11 12:07:03 +01:00
Philipp Schmitt 6c072dc503
Update repo url 2021-11-10 18:44:53 +01:00
Philipp Schmitt 55fedda2de
Update url 2021-11-10 18:27:26 +01:00
Alexandros Kozak c63603f1e2 Suppress exit code when nearcolor is not available 2021-11-09 10:58:44 -08:00
Aaron Lichtman 9a5a4a5199
Delete FUNDING.yml 2021-11-01 04:54:26 -05:00
Aaron Lichtman 55073ac3b1
Merge pull request #2 from vladdoster/patch-1 2021-11-01 04:09:05 -05:00
vladislav doster a4cd9a4ec0
(maint): update links to point towards zdharma-contiuum 2021-11-01 04:08:13 -05:00
Sebastian Gniazdowski 817916dfa9 Update plugin.zsh (work dir setting by default). 2021-05-14 14:57:11 -05:00
Sebastian Gniazdowski a62d721aff
Merge pull request #215 from xPMo/patch-1
Blacklist zle-keymap-select widget
2021-01-21 17:57:34 +01:00
xPMo 6c1c00bba0
Blacklist zle-keymap-select widget
Fixes #214
2021-01-21 09:20:43 -06:00
Sebastian Gniazdowski be2f385453
Merge pull request #206 from xerus2000/patch-1
Fix oh-my-zsh guide in README.md
2020-11-26 12:01:05 +01:00
Janek f88a94b8fa
Fix oh-my-zsh guide in README.md 2020-10-08 11:14:36 +02:00
Sebastian Gniazdowski a47b508863 Revert "Merge pull request #198 from pushqrdx/master"
This reverts commit 52bd095088, reversing
changes made to 865566ce48.
2020-08-12 01:48:43 +02:00
Sebastian Gniazdowski 52bd095088
Merge pull request #198 from pushqrdx/master
Fix highlighting lost issues with tab completions and stack pop
2020-08-08 12:52:18 +02:00
pushqrdx 94717acab1 check for v5.4 and fallback for older versions
this commit addresses versions older than 5.4 by using older widget hook method
2020-08-08 12:46:01 +02:00
pushqrdx daf9b6c1fe check for appropriate zsh version
adds the check for minimum zsh version supporting `add-zle-hook-widget` for `zle-line-init`
2020-08-07 21:30:00 +02:00
pushqrdx 98876e4e8b fix for highlight loss issues
this commit fixes
1- highlighting lost after tab completion with no results
2- highlighting lost after popping from the stack
2020-08-07 17:30:02 +02:00
Sebastian Gniazdowski 865566ce48 plugin.zsh: Solve the permissions problems #185 2020-07-04 01:56:49 +02:00
Sebastian Gniazdowski 5317179cf4 highlight: Don't use the #i flag for non-extendedglob shells #179 2020-06-29 19:56:23 +02:00
Sebastian Gniazdowski 5d0e4fef45 highlight: Fix the OS X test #179 2020-06-29 10:58:39 +02:00