style-guide: define environment variable usage (#19685)

* Update style-guide.md

* Update contributing-guides/style-guide.md

Co-authored-by: Lena Pastwa <lena@lnps.me>

* Update contributing-guides/style-guide.md

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* Update contributing-guides/style-guide.md

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* Update style-guide.md

Co-authored-by: Lena Pastwa <lena@lnps.me>

---------

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Lena Pastwa <lena@lnps.me>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
This commit is contained in:
Managor
2025-12-01 00:56:56 +02:00
committed by GitHub
parent 1a884f0fda
commit af0096ddf8
+6
View File
@@ -319,6 +319,12 @@ If a program requires root privileges to run and doesn't provide its own prompt
Avoid explaining general UNIX concepts that could apply to any command (i.e. relative/absolute paths, glob patterns/wildcards, special character escaping, program return values, ...)
When describing an environment variable for UNIX platforms, prepend the variable with a dollar sign and enclose it with backticks (`$VARIABLE_NAME`). For example: "Manage the `$JAVA_HOME` environment variable".
For Windows command prompt, prepend and append the environment variable with a percent sign and enclose it with backticks (`%VARIABLE_NAME%`). For example: "Manage the `%JAVA_HOME%` environment variable".
Whereas for Powershell, prepend the environment variable with a dollar sign, Env and a colon, then enclose it with backticks (`$Env:VARIABLE_NAME`). For example: "Manage the `$Env:JAVA_HOME` environment variable".
### Standardized Terms
Some terms are used repeatedly throughout pages, and as such, should be standardized. These include: