on master help sign in
Update help text
commit70ffd60b207774a55d74523ae6c206bbd8c810e9 authorsharkdp <davidpeter@web.de> dateSun 22 Apr 2018, 13:45 (9 years ago) parent36d9236
2 files changed+7−5
Cargo.toml+1 src/main.rs+6−5
Cargo.toml+1
@@ -1,6 +1,7 @@
11[package]
22authors = ["David Peter <mail@david-peter.de>"]
33categories = ["command-line-utilities"]
4+description="A cat(1) clone with wings."
45homepage = "https://github.com/sharkdp/bat"
56license = "MIT/Apache-2.0"
67name = "bat"
src/main.rs+6−5
@@ -149,7 +149,7 @@ fn run(matches: &ArgMatches) -> Result<()> {
149149 let theme_set = ThemeSet::load_from_folder("/home/shark/Informatik/rust/bat/themes").unwrap();
150150 let theme = &theme_set.themes["Monokai"];
151151
152− if let Some(files) = matches.values_of("file") {
152+ if let Some(files) = matches.values_of("FILE") {
153153 for file in files {
154154 let line_changes = get_line_changes(file.to_string());
155155 print_file(theme, file, line_changes)?;
@@ -166,17 +166,18 @@ fn main() {
166166 AppSettings::ColorNever
167167 };
168168
169− let matches = App::new("bat")
169+ let matches = App::new(crate_name!())
170170 .version(crate_version!())
171171 .setting(clap_color_setting)
172172 .setting(AppSettings::DeriveDisplayOrder)
173173 .setting(AppSettings::UnifiedHelpMessage)
174174 .setting(AppSettings::NextLineHelp)
175+ .setting(AppSettings::DisableVersion)
175176 .max_term_width(90)
176− .about("A cat(1) clone with wings.")
177+ .about(crate_description!())
177178 .arg(
178− Arg::with_name("file")
179− .help("Files to print")
179+ Arg::with_name("FILE")
180+ .help("File(s) to print")
180181 .multiple(true)
181182 .empty_values(false),
182183 )