From 80da2a3f0a77ba87cef3918d7759351f10aac343 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Mon, 14 Oct 2024 09:34:14 -0400 Subject: [PATCH] fix: forgot to update after testing Signed-off-by: Devin Buhl --- minijinja-cli/src/cli.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/minijinja-cli/src/cli.rs b/minijinja-cli/src/cli.rs index 5207b8e5..9179c970 100644 --- a/minijinja-cli/src/cli.rs +++ b/minijinja-cli/src/cli.rs @@ -37,6 +37,9 @@ pub(super) fn make_command() -> Command { .env("MINIJINJA_TRIM_BLOCKS"), arg!(--"lstrip-blocks" "Enable the lstrip_blocks flag") .env("MINIJINJA_LSTRIP_BLOCKS"), + #[cfg(feature = "contrib")] + arg!(--"py-compat" "Enables improved Python compatibility. Enabling \ + this adds methods such as dict.keys and some others."), arg!(-s --syntax ... "Changes a syntax feature (feature=value)") .env("MINIJINJA_SYNTAX"), arg!(--"safe-path" ... "Only allow includes from this path. Can be used multiple times.") @@ -58,6 +61,20 @@ pub(super) fn make_command() -> Command { arg!(--dump "dump internals of a template") .value_parser(["instructions", "ast", "tokens"]) .env("MINIJINJA_DUMP"), + #[cfg(feature = "repl")] + arg!(--repl "starts the repl with the given data") + .conflicts_with_all(["expr", "template"]), + #[cfg(feature = "completions")] + arg!(--"generate-completion" "generate a completion script for the given shell") + .value_parser([ + "bash", + "elvish", + "fig", + "fish", + "nushell", + "powershell", + "zsh", + ]), arg!(-o --output "path to the output file") .default_value("-") .value_parser(value_parser!(PathBuf))