diff options
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. extern crate log; +use built_info; use clap::{Arg, App}; use index::{Line, Column}; use config::{Dimensions, Shell}; @@ -20,6 +21,14 @@ use std::borrow::Cow; const DEFAULT_TITLE: &'static str = "Alacritty"; +fn crate_long_version() -> String { + format!("{} (git commit {}) [{} build using {}])", + built_info::PKG_VERSION, + built_info::GIT_VERSION.unwrap_or(""), + built_info::PROFILE, + built_info::RUSTC_VERSION) +} + /// Options specified on the command line pub struct Options { pub live_config_reload: Option<bool>, @@ -56,6 +65,7 @@ impl Options { let matches = App::new(crate_name!()) .version(crate_version!()) + .long_version(crate_long_version().as_str()) .author(crate_authors!("\n")) .about(crate_description!()) .arg(Arg::with_name("ref-test") |