mirror of
https://github.com/zdharma-continuum/fast-syntax-highlighting.git
synced 2026-09-10 07:16:18 -04:00
|
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>
|
||
|---|---|---|
| .. | ||
| _output | ||
| _support | ||
| example.zunit | ||
| main.zunit | ||