Skip to content
Snippets Groups Projects
Commit 1f46dacf authored by Phil Jones's avatar Phil Jones
Browse files

Fix typo in --graph-style option

Change "eigth-block" to "eighth-block"
parent 35dd631e
No related branches found
Tags v2.1.1
No related merge requests found
......@@ -231,9 +231,9 @@ the browser with the 'g' key.
Change the way that the relative size bar column is drawn. Recognized values
are I<hash> to draw ASCII C<#> characters (most portable), I<half-block> to use
half-block drawing characters (the default) or I<eigth-block> to use
eigth-block drawing characters. Eigth-block characters are the most precise but
may not render correctly in all terminals.
half-block drawing characters (the default) or I<eighth-block> to use
eighth-block drawing characters. Eighth-block characters are the most precise
but may not render correctly in all terminals.
=item B<--shared-column> I<OPTION>
......
......@@ -238,7 +238,7 @@ const Row = struct {
ui.addstr(switch (main.config.graph_style) {
.hash => ([_][:0]const u8{ " ", " ", " ", " ", " ", " ", " ", " ", "#" })[frac],
.half => ([_][:0]const u8{ " ", " ", " ", " ", "▌", "▌", "▌", "▌", "█" })[frac],
.eigth => ([_][:0]const u8{ " ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█" })[frac],
.eighth => ([_][:0]const u8{ " ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█" })[frac],
});
num -|= perblock;
}
......
......@@ -61,7 +61,7 @@ pub const config = struct {
pub var show_mtime: bool = false;
pub var show_graph: bool = true;
pub var show_percent: bool = false;
pub var graph_style: enum { hash, half, eigth } = .half;
pub var graph_style: enum { hash, half, eighth } = .half;
pub var sort_col: SortCol = .blocks;
pub var sort_order: SortOrder = .desc;
pub var sort_dirsfirst: bool = false;
......@@ -186,7 +186,7 @@ fn argConfig(args: *Args, opt: Args.Option) bool {
const val = args.arg();
if (std.mem.eql(u8, val, "hash")) config.graph_style = .hash
else if (std.mem.eql(u8, val, "half-block")) config.graph_style = .half
else if (std.mem.eql(u8, val, "eigth-block")) config.graph_style = .eigth
else if (std.mem.eql(u8, val, "eighth-block")) config.graph_style = .eighth
else ui.die("Unknown --graph-style option: {s}.\n", .{val});
} else if (opt.is("--sort")) {
var val: []const u8 = args.arg();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment