Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

languages: Add ssh_config.d/*.conf as a glob for sshclientconfig #11947

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
languages: Add ssh_config.d/*.conf as a glob for sshclientconfig
The ssh_config format supports a config file fragment inclusion
mechanism by using the `Include` directive. Some Linux distros such
as Debian, Ubuntu, and distros derived from Debian/Ubuntu specify
`Include /etc/ssh/ssh_config.d/*.conf` in their default
/etc/ssh/ssh_config config file [0]. Similarly, ssh users can also use
this directive in their ~/.ssh/config file, for instance specifying
`Include ssh_config.d/*.conf` to include all files matching the glob
`~/.ssh/ssh_config.d/*.conf` into their ssh client configuration.

This commit adds the glob `ssh_config.d/*.conf` to the sshclientconfig
language so that these config file fragments will be detected.

[0] https://salsa.debian.org/ssh-team/openssh/-/blob/e9f52d3c18a4bb5e2055bcec0cf08abfb137ea2c/debian/patches/debian-config.patch#L126
edmonds committed Oct 27, 2024
commit 244d1eeb48a4bac38c79feef0fac95186e523d85
2 changes: 1 addition & 1 deletion languages.toml
Original file line number Diff line number Diff line change
@@ -2203,7 +2203,7 @@ source = { git = "https://github.com/staysail/tree-sitter-meson", rev = "32a83e8
[[language]]
name = "sshclientconfig"
scope = "source.sshclientconfig"
file-types = [{ glob = ".ssh/config" }, { glob = "/etc/ssh/ssh_config" }]
file-types = [{ glob = ".ssh/config" }, { glob = "/etc/ssh/ssh_config" }, { glob = "ssh_config.d/*.conf" } ]
comment-token = "#"

[[grammar]]