From e02919de2156bcbf6d25cc3e5dbb851708f5d980 Mon Sep 17 00:00:00 2001 From: Rootiest Date: Mon, 17 Aug 2026 21:53:48 -0400 Subject: [PATCH] fix(config): translate hyphens to underscores in sub-category guard variable names __fish_config_op_enabled built the sub-category override variable name by concatenating the tag's slug verbatim, e.g. __fish_config_op_integrations_window-mgmt. Fish variable names cannot contain hyphens, so any hyphenated sub-category slug (14 of the 24 in the taxonomy) silently could never be overridden -- an unset such variable safely fell through via set -q, but attempting to set it always errored with "invalid variable name", masking the defect since no prior smoke test exercised an explicit sub-category-level toggle. The registry tag itself (as authored in # COMPONENT headers and the taxonomy docs) stays hyphenated; only the derived fish variable name is translated. --- functions/__fish_config_op_enabled.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/__fish_config_op_enabled.fish b/functions/__fish_config_op_enabled.fish index 18f143c..ec877e2 100644 --- a/functions/__fish_config_op_enabled.fish +++ b/functions/__fish_config_op_enabled.fish @@ -61,7 +61,7 @@ function __fish_config_op_enabled --description 'Guard for an opinionated compon for tag in $tags set -l parts (string split -m 1 -- / $tag) set -l category_var "__fish_config_op_$parts[1]" - set -l subcat_var "__fish_config_op_$parts[1]_$parts[2]" + set -l subcat_var "__fish_config_op_$parts[1]_"(string replace -a -- '-' '_' $parts[2]) __fish_config_op_cascade $category_var $subcat_var or return 1 end