Skip to content

Commit

Permalink
use env! for name and version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Dahan committed Sep 11, 2019
1 parent ddadb7d commit 19163dc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ pub mod plugins;
use crate::identifier::Identifier;
use crate::plugins::Plugins;

const NAME: &str = env!("CARGO_PKG_NAME");
const VERSION: &str = env!("CARGO_PKG_VERSION");

/// We have three main commands
///
/// `load`: download and print sourceable zsh to load scripts
Expand All @@ -40,13 +43,13 @@ fn main() {

fn print_help() {
println!("
zr {version}
{name} {version}
by Jonathan Dahan <[email protected]>
zr help show help
zr list list cached plugins
zr update update plugin repositories
zr load generate file to source from [http://example.com/]plugin/name[.git/path/to/file.zsh]", version=env!("CARGO_PKG_VERSION"))
{name} help show help
{name} list list cached plugins
{name} update update plugin repositories
{name} load generate file to source from [http://example.com/]plugin/name[.git/path/to/file.zsh]", version=VERSION, name=NAME)
}

/// Create plugins from an existing `load` output
Expand Down

0 comments on commit 19163dc

Please sign in to comment.