Add command to display the current repo

main
trivernis 10 months ago
parent 0d51537b98
commit ee1ff03df3
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -23,6 +23,9 @@ pub enum Command {
/// Print the entire context available to templates /// Print the entire context available to templates
Context, Context,
/// Print the path of the repo
Repo,
} }
fn default_repo() -> &'static str { fn default_repo() -> &'static str {

@ -22,6 +22,9 @@ fn main() -> Result<()> {
serde_json::to_string_pretty(templating::context()).into_diagnostic()? serde_json::to_string_pretty(templating::context()).into_diagnostic()?
) )
} }
args::Command::Repo => {
println!("{}", args.repo.to_string_lossy())
}
} }
Ok(()) Ok(())

Loading…
Cancel
Save