You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace all non-alphanumerics in active help env var program prefix (#1940)
* Replace all non-alphanumerics in active help env var program prefix
There are other characters besides the dash that are fine in program
names, but are problematic in environment variable names. These include
(but are not limited to) period, space, and non-ASCII letters.
* Another change in docs to mention non-ASCII-alphanumeric instead of just dash
Copy file name to clipboardExpand all lines: site/content/active_help.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ Allowing to configure Active Help is entirely optional; you can use Active Help
92
92
93
93
The way to configure Active Help is to use the program's Active Help environment
94
94
variable. That variable is named `<PROGRAM>_ACTIVE_HELP` where `<PROGRAM>` is the name of your
95
-
program in uppercase with any `-` replaced by an `_`. The variable should be set by the user to whatever
95
+
program in uppercase with any non-ASCII-alphanumeric characters replaced by an `_`. The variable should be set by the user to whatever
96
96
Active Help configuration values are supported by the program.
97
97
98
98
For example, say `helm` has chosen to support three levels for Active Help: `on`, `off`, `local`. Then a user
@@ -140,7 +140,7 @@ details for your users.
140
140
141
141
Debugging your Active Help code is done in the same way as debugging your dynamic completion code, which is with Cobra's hidden `__complete` command. Please refer to [debugging shell completion](shell_completions.md#debugging) for details.
142
142
143
-
When debugging with the `__complete` command, if you want to specify different Active Help configurations, you should use the active help environment variable. That variable is named `<PROGRAM>_ACTIVE_HELP` where any `-` is replaced by an `_`. For example, we can test deactivating some Active Help as shown below:
143
+
When debugging with the `__complete` command, if you want to specify different Active Help configurations, you should use the active help environment variable. That variable is named `<PROGRAM>_ACTIVE_HELP` where any non-ASCII-alphanumeric characters are replaced by an `_`. For example, we can test deactivating some Active Help as shown below:
0 commit comments