pub struct Positional {
pub overrides: Vec<(String, String)>,
pub search_directory: Option<String>,
pub arguments: Vec<String>,
}
Expand description
A struct containing the parsed representation of positional command-line arguments, i.e. arguments that are not flags, options, or the subcommand.
The DSL of positional arguments is fairly complex and mostly accidental. There are three possible components: overrides, a search directory, and the rest:
-
Overrides are of the form
NAME=.*
-
After overrides comes a single optional search directory argument. This is either ‘.’, ‘..’, or an argument that contains a
/
.If the argument contains a
/
, everything before and including the slash is the search directory, and everything after is added to the rest. -
Everything else is an argument.
Overrides set the values of top-level variables in the justfile being invoked and are a convenient way to override settings.
For modes that do not take other arguments, the search directory argument
determines where to begin searching for the justfile. This allows command
lines like just -l ..
and just ../build
to find the same justfile.
For modes that do take other arguments, the search argument is simply prepended to rest.
Fields§
§overrides: Vec<(String, String)>
Overrides from values of the form [a-zA-Z_][a-zA-Z0-9_-]*=.*
search_directory: Option<String>
An argument equal to ‘.’, ‘..’, or ending with /
arguments: Vec<String>
Everything else