diff --git a/imag-view/src/main.rs b/imag-view/src/main.rs index 2fa7802b..16cc0b91 100644 --- a/imag-view/src/main.rs +++ b/imag-view/src/main.rs @@ -52,6 +52,11 @@ fn main() { let entry_id = rt.cli().value_of("id").unwrap(); // enforced by clap + if entry_id.contains("~") { + error!("The --id argument does not need the version part"); + exit(1); + } + if rt.cli().is_present("versions") { if let Err(e) = view_versions_of(entry_id, &rt) { trace_error(&e); diff --git a/imag-view/src/ui.rs b/imag-view/src/ui.rs index 54979f1f..45c05ed1 100644 --- a/imag-view/src/ui.rs +++ b/imag-view/src/ui.rs @@ -14,7 +14,7 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> { .long("version") .short("V") .takes_value(true) - .required(false) + .required(true) .help("View this version (youngest if not specified)") .value_name("VERSION")) diff --git a/imag-view/src/viewer/stdout.rs b/imag-view/src/viewer/stdout.rs index a42af1c1..18536da6 100644 --- a/imag-view/src/viewer/stdout.rs +++ b/imag-view/src/viewer/stdout.rs @@ -24,6 +24,7 @@ impl Viewer for StdoutViewer { } if vi.view_header { + debug!("Going to display header: {:?}", vi.entry.get_header().header()); println!("{}", encode_str(vi.entry.get_header().header())); }