#3728·just

Evaluate default parameters for `--usage` and `--list` (at least const expressions)

Author: noahkawaguchiCreated Sep 30, 2026Updated Sep 30, 2026

It would be nice if default parameters were evaluated in --usage and --list, at least for const expressions, since const expressions are already evaluated for help strings. As an example of the current behavior:

just
you := 'world'

[arg('name', help='Defaults to ' + you)]
hello name=you:
    echo 'Hello, {{ name }}!'
j --usage hello
Usage: just hello [name]

Arguments:
  [name] Defaults to world [default: you]

I guess it's distinguishable as the variable you rather than the literal string "you" since it's unquoted, but to me, it looks a bit misleading, especially if you're just running --usage or --list without having looked through the justfile to see that you is a variable.

It looks like #1411 might be usable as a starting point if this was to be implemented. That was using a --evaluate flag, but other possibilities I can think of are just making this the default behavior and/or making it a setting.