mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-03 04:08:50 +01:00
Update help text
This commit is contained in:
parent
36d92361be
commit
70ffd60b20
@ -1,6 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
authors = ["David Peter <mail@david-peter.de>"]
|
authors = ["David Peter <mail@david-peter.de>"]
|
||||||
categories = ["command-line-utilities"]
|
categories = ["command-line-utilities"]
|
||||||
|
description="A cat(1) clone with wings."
|
||||||
homepage = "https://github.com/sharkdp/bat"
|
homepage = "https://github.com/sharkdp/bat"
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
name = "bat"
|
name = "bat"
|
||||||
|
11
src/main.rs
11
src/main.rs
@ -149,7 +149,7 @@ fn run(matches: &ArgMatches) -> Result<()> {
|
|||||||
let theme_set = ThemeSet::load_from_folder("/home/shark/Informatik/rust/bat/themes").unwrap();
|
let theme_set = ThemeSet::load_from_folder("/home/shark/Informatik/rust/bat/themes").unwrap();
|
||||||
let theme = &theme_set.themes["Monokai"];
|
let theme = &theme_set.themes["Monokai"];
|
||||||
|
|
||||||
if let Some(files) = matches.values_of("file") {
|
if let Some(files) = matches.values_of("FILE") {
|
||||||
for file in files {
|
for file in files {
|
||||||
let line_changes = get_line_changes(file.to_string());
|
let line_changes = get_line_changes(file.to_string());
|
||||||
print_file(theme, file, line_changes)?;
|
print_file(theme, file, line_changes)?;
|
||||||
@ -166,17 +166,18 @@ fn main() {
|
|||||||
AppSettings::ColorNever
|
AppSettings::ColorNever
|
||||||
};
|
};
|
||||||
|
|
||||||
let matches = App::new("bat")
|
let matches = App::new(crate_name!())
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
.setting(clap_color_setting)
|
.setting(clap_color_setting)
|
||||||
.setting(AppSettings::DeriveDisplayOrder)
|
.setting(AppSettings::DeriveDisplayOrder)
|
||||||
.setting(AppSettings::UnifiedHelpMessage)
|
.setting(AppSettings::UnifiedHelpMessage)
|
||||||
.setting(AppSettings::NextLineHelp)
|
.setting(AppSettings::NextLineHelp)
|
||||||
|
.setting(AppSettings::DisableVersion)
|
||||||
.max_term_width(90)
|
.max_term_width(90)
|
||||||
.about("A cat(1) clone with wings.")
|
.about(crate_description!())
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("file")
|
Arg::with_name("FILE")
|
||||||
.help("Files to print")
|
.help("File(s) to print")
|
||||||
.multiple(true)
|
.multiple(true)
|
||||||
.empty_values(false),
|
.empty_values(false),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user