Increase --list maximum alignable width from 30 to 50 (#2039)
This commit is contained in:
parent
e2c9405fa9
commit
c796a253af
@ -427,6 +427,8 @@ impl Subcommand {
|
||||
}
|
||||
|
||||
fn list(config: &Config, level: usize, justfile: &Justfile) {
|
||||
const MAX_WIDTH: usize = 50;
|
||||
|
||||
// Construct a target to alias map.
|
||||
let mut recipe_aliases: BTreeMap<&str, Vec<&str>> = BTreeMap::new();
|
||||
if !config.no_aliases {
|
||||
@ -460,13 +462,13 @@ impl Subcommand {
|
||||
);
|
||||
}
|
||||
|
||||
if line_width <= 30 {
|
||||
if line_width <= MAX_WIDTH {
|
||||
line_widths.insert(name, line_width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let max_line_width = cmp::min(line_widths.values().copied().max().unwrap_or(0), 30);
|
||||
let max_line_width = cmp::min(line_widths.values().copied().max().unwrap_or(0), MAX_WIDTH);
|
||||
let doc_color = config.color.stdout().doc();
|
||||
|
||||
if level == 0 {
|
||||
|
@ -902,7 +902,7 @@ x a b='B ' c='C':
|
||||
echo {{a}} {{b}} {{c}}
|
||||
|
||||
# something else
|
||||
this-recipe-is-very-very-very-important Z="\t z":
|
||||
this-recipe-is-very-very-very-very-very-very-very-very-important Z="\t z":
|
||||
|
||||
# this recipe will not appear
|
||||
_private-recipe:
|
||||
@ -911,7 +911,7 @@ _private-recipe:
|
||||
stdout: r#"
|
||||
Available recipes:
|
||||
hello a b='B ' c='C' # this does a thing
|
||||
this-recipe-is-very-very-very-important Z="\t z" # something else
|
||||
this-recipe-is-very-very-very-very-very-very-very-very-important Z="\t z" # something else
|
||||
x a b='B ' c='C' # this does another thing
|
||||
"#,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user