From 7c253991e8a4155ef645957ab048ccc0a0bd1b75 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Tue, 28 May 2019 20:36:12 -0500 Subject: [PATCH] DOCS: move the env command help text into a text file. --- src/help/env.txt | 7 +++++++ src/main.rs | 10 +--------- 2 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 src/help/env.txt diff --git a/src/help/env.txt b/src/help/env.txt new file mode 100644 index 0000000..66ec909 --- /dev/null +++ b/src/help/env.txt @@ -0,0 +1,7 @@ +Universal Configuration Grammar compiler + +ENVIRONMENT VARIABLES: + + UCG_IMPORT_PATH="{}" + A list of paths to search for imports from. Uses the same syntax + as your platforms $PATH environment variable. diff --git a/src/main.rs b/src/main.rs index f2fd49a..0d33b8c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -499,16 +499,8 @@ fn importers_command(registry: &ImporterRegistry) { } fn env_help() { - println!("Universal Configuration Grammar compiler."); - println!(""); - println!("ENVIRONMENT VARIABLES:"); - println!(""); println!( - " - UCG_IMPORT_PATH=\"{}\" - A list of paths to search for imports from. Uses the same syntax - as your platforms $PATH environment variable. -", + include_str!("help/env.txt"), std::env::var("UCG_IMPORT_PATH").unwrap_or(String::new()) ); }