refactor: derive enum values from man page #4
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/blink-cmp-ssh!4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/derive-enums-from-man"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
static_enumswas a manually maintained table of ~40 keywords withhardcoded valid values. This could go stale when OpenSSH adds, removes,
or changes config options across versions.
Solution
Parse enum values directly from the
ssh_configman page at runtimeusing two extraction strategies:
must be X, Y, or Z" and "The possible values are: X, Y, and Z"
patterns for keywords without a single summary sentence
Also fixes keyword detection to handle digits in names (
ForwardX11,ForwardX11Trusted) and inline definitions (Tunnel,SetEnv).Covers 36/41 old hardcoded keywords and discovers 4 new ones (
IPQoS,SyslogFacility,ObscureKeystrokeTiming,ControlPersist). The 5missing keywords are yes/no booleans whose man page descriptions don't
explicitly enumerate their values.