Skip to content

Commit

Permalink
Improve ProxyJump parameter parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Nov 17, 2023
1 parent 5b0ac6d commit 1651e63
Show file tree
Hide file tree
Showing 5 changed files with 12,517 additions and 12,247 deletions.
9 changes: 4 additions & 5 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ module.exports = grammar({
$._identity_agent_arg,
$._ipqos_arg,
$._proxy_command_arg,
$._proxy_jump_arg,
$._request_tty_arg,
$._security_key_provider_arg,
$._strict_host_key_checking_arg,
Expand Down Expand Up @@ -761,17 +760,17 @@ module.exports = grammar({
_proxy_jump: $ => seq(
u.keyword('ProxyJump'),
$._sep,
u.argument($._proxy_jump_arg)
u.list(',', u.argument($._proxy_jump_value))
),

_proxy_jump_arg: $ => choice(
_proxy_jump_value: $ => choice(
'none',
seq(
optional(seq(
field('user', alias(/\S+/, $.string)),
field('user', alias(/[\w+-]+/, $.string)),
'@'
)),
field('host', alias(/\S+/, $.string)),
field('host', alias(/[\w.+-]+/, $.string)),
optional(seq(
':',
field('port', $.number)
Expand Down
44 changes: 36 additions & 8 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1651e63

Please sign in to comment.