Closed 1978ajot closed 1 year ago
Commit 2581ff1 broke relative path references to "include".
Your patch fixed relative path references, but broke absolute path references. I think we need a better solution to this problem.
Works for me. Thanks!
@sunlei I found an edge case where autocompletion doesn't work if there is an Include path with wildcards but no matches are found.
My use case is that I have another python tool to create / delete VMs and when created, an ssh_config file is generated per project in the tool's directory, so something like:
Include ~/tools/overlord/projects/*/ssh_configs/*
However, if I have no current projects then I get errors when I try to autocomplete because no matches are found for the above wildcard.
I think I found a fix which is to include the following in _parse_config_file by adding the following:
# disable no match errors for Include with wildcard statements that don't have matches
unsetopt nomatch
This temporarily disables the error message from the attempt at glob expansion and proceeds to auto-complete based on the rest of the SSH config.
I thought it's too trivial to submit a PR so I'm just mentioning it here. On older versions of this plugin (not sure which ones), this wasn't a problem.
Commit 2581ff1 brokes autocompletion (at least for included files).
Here is my patch to fix that issue: