mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 12:37:49 +00:00
Merge pull request #1128 from bltnkl/tail_readme_fix
tail: add spaces after hashes
This commit is contained in:
commit
ac797b95ee
2 changed files with 5 additions and 6 deletions
|
@ -4,7 +4,6 @@ Rudimentary tail implementation.
|
||||||
|
|
||||||
### Flags with features
|
### Flags with features
|
||||||
* `--max-unchanged-stats` : with `--follow=name`, reopen a FILE which has not changed size after N (default 5) iterations to see if it has been unlinked or renamed (this is the usual case of rotated log files). With inotify, this option is rarely useful.
|
* `--max-unchanged-stats` : with `--follow=name`, reopen a FILE which has not changed size after N (default 5) iterations to see if it has been unlinked or renamed (this is the usual case of rotated log files). With inotify, this option is rarely useful.
|
||||||
* `--quiet` : never output headers giving file names
|
|
||||||
* `--retry` : keep trying to open a file even when it is or becomes inaccessible; useful when follow‐ing by name, i.e., with `--follow=name`
|
* `--retry` : keep trying to open a file even when it is or becomes inaccessible; useful when follow‐ing by name, i.e., with `--follow=name`
|
||||||
|
|
||||||
### Others
|
### Others
|
||||||
|
|
|
@ -79,8 +79,8 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
opts.optflag("h", "help", "help");
|
opts.optflag("h", "help", "help");
|
||||||
opts.optflag("V", "version", "version");
|
opts.optflag("V", "version", "version");
|
||||||
opts.optflag("v", "verbose", "always output headers giving file names");
|
opts.optflag("v", "verbose", "always output headers giving file names");
|
||||||
// TODO: --silent flag as alias to --quiet
|
|
||||||
opts.optflag("q", "quiet", "never output headers giving file names");
|
opts.optflag("q", "quiet", "never output headers giving file names");
|
||||||
|
opts.optflag("", "silent", "synonym of --quiet");
|
||||||
|
|
||||||
let given_options = match opts.parse(&args) {
|
let given_options = match opts.parse(&args) {
|
||||||
Ok (m) => { m }
|
Ok (m) => { m }
|
||||||
|
@ -167,7 +167,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
let verbose = given_options.opt_present("v");
|
let verbose = given_options.opt_present("v");
|
||||||
let quiet = given_options.opt_present("q");
|
let quiet = given_options.opt_present("q") || given_options.opt_present("silent");
|
||||||
|
|
||||||
let files = given_options.free;
|
let files = given_options.free;
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
|
|
||||||
for filename in &files {
|
for filename in &files {
|
||||||
if (multiple || verbose) && !quiet {
|
if (multiple || verbose) && !quiet {
|
||||||
if !first_header { println!(""); }
|
if !first_header { println!(); }
|
||||||
println!("==> {} <==", filename);
|
println!("==> {} <==", filename);
|
||||||
}
|
}
|
||||||
first_header = false;
|
first_header = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue