Commit 333475e
committed
fix(help): print description on newlines for long flags
Follow-up to #2944. When flags are over 21 characters, the description
is printed on a new line to avoid the flag from intersecting with the
description and keeping everything aligned. This mimics what pacman does
for long flags like `--disable-sandbox`.
I decided to add logic to solve this instead of just adding a newline to
the `--completioninterval` description (the only flag currently over 21
characters) so any future long flags added will automatically be aligned
too.1 parent 328f4b4 commit 333475e
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
103 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
104 | 112 | | |
105 | | - | |
| 113 | + | |
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
| |||
0 commit comments