zdharma-continuum.fast-synt.../tests
Max Coplan 4672ad5dd9
Some checks failed
zunit / zunit (push) Has been cancelled
fix(chroma/ssh): treat -R and -Q as flags that take an argument (#91)
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
..
_output zunit: First test for extended version of zunit (patch sent to upstream) 2019-07-18 03:07:26 +02:00
_support zunit: First test for extended version of zunit (patch sent to upstream) 2019-07-18 03:07:26 +02:00
example.zunit zunit: First test for extended version of zunit (patch sent to upstream) 2019-07-18 03:07:26 +02:00
main.zunit fix(chroma/ssh): treat -R and -Q as flags that take an argument (#91) 2026-08-31 09:14:04 +02:00