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
Copy file name to clipboardExpand all lines: docs/guidelines/aesthetics.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,8 +27,8 @@ In the past, the maximum number of characters per line (CPL) was limited to 80 b
27
27
/// admonition | General Guidelines
28
28
type: info
29
29
30
-
-**CPL Limit**: Set a maximum CPL of <u>88 characters</u>.
31
-
-**Reason**: An 88-character limit balances the historical 80-character standard and the need for more descriptive code. It accommodates longer variable names, comments, and strings without sacrificing readability.
30
+
-**CPL Limit**: Set a maximum CPL of <u>92 characters</u>.
31
+
-**Reason**: An 92-character limit balances the historical 80-character standard and the need for more descriptive code. It accommodates longer variable names, comments, and strings without sacrificing readability.
32
32
-**Exceptions**: The CPL limit may be exceeded if line splitting _significantly_ reduces readability or negatively impacts the script's structure.
33
33
34
34
///
@@ -122,7 +122,7 @@ mkdir -p /path/to/backup \
122
122
//// tab | Piping Operators
123
123
124
124
- **Placement**: Similar to logical operators, when a piped command sequence exceeds the CPL limit, place each pipe (`|`) at the start of a new line with the preceding command (`| command`).
125
-
- **Single-Line Placement**: If piped commands fit within the 88-character limit, they may remain on the same line. Use this sparingly to avoid creating complex or hard-to-read sequences.
125
+
- **Single-Line Placement**: If piped commands fit within the 92-character limit, they may remain on the same line. Use this sparingly to avoid creating complex or hard-to-read sequences.
126
126
127
127
///// details | Examples
128
128
type: example
@@ -223,7 +223,7 @@ fi
223
223
- **Reason**: This format is best suited for simple conditions or loops that can be expressed succinctly.
224
224
- **Avoid Complex Logic**: Avoid adding multiple commands or complex logic to single-line structures.
225
225
- **Reason**: Including complex logic or multiple commands on a single line can reduce readability and make the code harder to maintain.
226
-
- **Character Limit**: <mark>**_DO NOT_**</mark> use a single-line control structure if it exceeds the 88-character limit.
226
+
- **Character Limit**: <mark>**_DO NOT_**</mark> use a single-line control structure if it exceeds the 92-character limit.
227
227
228
228
///// details | Example
229
229
type: example
@@ -572,10 +572,10 @@ done
572
572
- **Subsections**: Quadruple-pound signs can also indicate subsections within a larger script section. However, this should be done**VERY** sparingly. Consider using [triple-pound signs](#__tabbed_4_4) (`###`) before resorting to quadruple-pound signs for subsections.
573
573
- **Formatting**: Quadruple-pound sign comments should be formatted to ensure the transition between sections is clear and visually distinct. Below are the recommended formatting guidelines:
574
574
- **Section Naming**: Append `[ section_name ]` to the end of `####`, replacing `section_name` with a descriptive title for that section. The section name should clearly indicate the content or purpose of that section.
575
-
- **Filler Characters**: After the section name, append a series of `#` characters to fill the remaining space up to the 88-character limit.
575
+
- **Filler Characters**: After the section name, append a series of `#` characters to fill the remaining space up to the 92-character limit.
576
576
- **Section Comments**: If necessary, add comments directly below the initial `####` line, prefixing them with four `#` characters.
577
577
- **Spacing**: As mentioned in the [vertical spacing guidelines](#vertical-spacing), provide two blank lines before and after the quadruple-pound signs to enhance the visual separation between sections.
578
-
- **Subsection Format**: Subsections should follow the same format, with the number of brackets (`[]`) indicating the depth of the subsection within the script. The deeper the subsection, the more brackets should be used. Use filler characters to maintain a consistent 88-character width.
578
+
- **Subsection Format**: Subsections should follow the same format, with the number of brackets (`[]`) indicating the depth of the subsection within the script. The deeper the subsection, the more brackets should be used. Use filler characters to maintain a consistent 92-character width.
- **Usage**: Use three pound signs where the code is different enough to warrant distinction but not significant enough to be placed in an entirely new section.
626
626
- **Formatting**: Triple-pound sign comments should be formatted to ensure the transition between differing blocks of code is clear and visually distinct. Below are the recommended formatting guidelines:
627
627
- **Section Naming**: Append `[ section_name ]` to the end of `###`, replacing `section_name` with a descriptive title for that section. The section name should clearly indicate the content or purpose of the code below it.
628
-
- **Filler Characters**: After the section name, append a series of `#` characters to fill the remaining space up to the 88-character limit. Additionally, place three `#` characters above and below the section name line.
628
+
- **Filler Characters**: After the section name, append a series of `#` characters to fill the remaining space up to the 92-character limit. Additionally, place three `#` characters above and below the section name line.
629
629
- **Spacing**: Include a single blank line above and below the filler characters to separate the previous command(s), the triple pound sign comment, and the next command(s).
630
630
- **Section Comments**: If necessary, add comments to describe the section's content or purpose, prefixed with three `#` characters.
0 commit comments