mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 11:25:16 +08:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user