Skip to content

Commit ec8324c

Browse files
committed
btrfs-progs: help: adjust alignment of text
Provide more space for the text and drop the intiali padding at the beginning. Visually it's still separated by newlines so the indentation is not that important. This also leaves more space for the option help text so it does not need to be split to multiple lines. Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 781c28a commit ec8324c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

common/help.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ static int do_usage_one_command(const char * const *usagestr,
234234
fputc('\n', outf);
235235
while (*usagestr && **usagestr) {
236236
hpad(pad, outf);
237+
fprintf(outf, " ");
237238
fprintf(outf, "%s\n", *usagestr++);
238239
}
239240

common/help.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ struct cmd_group;
6565
#define HELPINFO_OPTION "\x01"
6666
#define HELPINFO_DESC "\x02"
6767
/* Keep the line length below 100 chars. */
68-
#define HELPINFO_PREFIX_WIDTH 4
69-
#define HELPINFO_LISTING_WIDTH 8
68+
#define HELPINFO_PREFIX_WIDTH 0
69+
#define HELPINFO_LISTING_WIDTH 2
7070
#define HELPINFO_OPTION_WIDTH 24
7171
#define HELPINFO_OPTION_MARGIN 2
7272
#define HELPINFO_DESC_PREFIX (HELPINFO_PREFIX_WIDTH + \

0 commit comments

Comments
 (0)