You've already forked uutils.github.io
mirror of
https://github.com/uutils/uutils.github.io.git
synced 2026-06-10 16:12:28 -07:00
deploy: f0e8d44e6e
This commit is contained in:
@@ -1268,27 +1268,6 @@
|
||||
<a href="#1268" id="1268">1268</a>
|
||||
<a href="#1269" id="1269">1269</a>
|
||||
<a href="#1270" id="1270">1270</a>
|
||||
<a href="#1271" id="1271">1271</a>
|
||||
<a href="#1272" id="1272">1272</a>
|
||||
<a href="#1273" id="1273">1273</a>
|
||||
<a href="#1274" id="1274">1274</a>
|
||||
<a href="#1275" id="1275">1275</a>
|
||||
<a href="#1276" id="1276">1276</a>
|
||||
<a href="#1277" id="1277">1277</a>
|
||||
<a href="#1278" id="1278">1278</a>
|
||||
<a href="#1279" id="1279">1279</a>
|
||||
<a href="#1280" id="1280">1280</a>
|
||||
<a href="#1281" id="1281">1281</a>
|
||||
<a href="#1282" id="1282">1282</a>
|
||||
<a href="#1283" id="1283">1283</a>
|
||||
<a href="#1284" id="1284">1284</a>
|
||||
<a href="#1285" id="1285">1285</a>
|
||||
<a href="#1286" id="1286">1286</a>
|
||||
<a href="#1287" id="1287">1287</a>
|
||||
<a href="#1288" id="1288">1288</a>
|
||||
<a href="#1289" id="1289">1289</a>
|
||||
<a href="#1290" id="1290">1290</a>
|
||||
<a href="#1291" id="1291">1291</a>
|
||||
</pre><pre class="rust"><code><span class="comment">// This file is part of the uutils coreutils package.
|
||||
//
|
||||
// For the full copyright and license information, please view the LICENSE file
|
||||
@@ -1312,33 +1291,11 @@
|
||||
<span class="kw">use </span>quick_error::quick_error;
|
||||
<span class="kw">use </span>uucore::display::Quotable;
|
||||
<span class="kw">use </span>uucore::error::UResult;
|
||||
<span class="kw">use </span>uucore::{format_usage, help_about, help_section, help_usage};
|
||||
|
||||
<span class="kw">const </span>ABOUT: <span class="kw-2">&</span>str =
|
||||
<span class="string">"Write content of given file or standard input to standard output with pagination filter"</span>;
|
||||
<span class="kw">const </span>AFTER_HELP: <span class="kw-2">&</span>str =
|
||||
<span class="string">" +PAGE\n Begin output at page number page of the formatted input.
|
||||
-COLUMN\n Produce multi-column output. See --column
|
||||
|
||||
The pr utility is a printing and pagination filter
|
||||
for text files. When multiple input files are specified,
|
||||
each is read, formatted, and written to standard
|
||||
output. By default, the input is separated
|
||||
into 66-line pages, each with
|
||||
|
||||
o A 5-line header with the page number, date,
|
||||
time, and the pathname of the file.
|
||||
|
||||
o A 5-line trailer consisting of blank lines.
|
||||
|
||||
If standard output is associated with a terminal,
|
||||
diagnostic messages are suppressed until the pr
|
||||
utility has completed processing.
|
||||
|
||||
When multiple column output is specified, text columns
|
||||
are of equal width. By default text columns
|
||||
are separated by at least one <blank>. Input lines
|
||||
that do not fit into a text column are truncated.
|
||||
Lines are not truncated under single column output."</span>;
|
||||
<span class="kw">const </span>ABOUT: <span class="kw-2">&</span>str = <span class="macro">help_about!</span>(<span class="string">"pr.md"</span>);
|
||||
<span class="kw">const </span>USAGE: <span class="kw-2">&</span>str = <span class="macro">help_usage!</span>(<span class="string">"pr.md"</span>);
|
||||
<span class="kw">const </span>AFTER_HELP: <span class="kw-2">&</span>str = <span class="macro">help_section!</span>(<span class="string">"after help"</span>, <span class="string">"pr.md"</span>);
|
||||
<span class="kw">const </span>TAB: char = <span class="string">'\t'</span>;
|
||||
<span class="kw">const </span>LINES_PER_PAGE: usize = <span class="number">66</span>;
|
||||
<span class="kw">const </span>LINES_PER_PAGE_FOR_FORM_FEED: usize = <span class="number">63</span>;
|
||||
@@ -1486,6 +1443,7 @@ Lines are not truncated under single column output."</span>;
|
||||
.version(<span class="macro">crate_version!</span>())
|
||||
.about(ABOUT)
|
||||
.after_help(AFTER_HELP)
|
||||
.override_usage(format_usage(USAGE))
|
||||
.infer_long_args(<span class="bool-val">true</span>)
|
||||
.args_override_self(<span class="bool-val">true</span>)
|
||||
.disable_help_flag(<span class="bool-val">true</span>)
|
||||
|
||||
@@ -435,10 +435,6 @@
|
||||
<a href="#435" id="435">435</a>
|
||||
<a href="#436" id="436">436</a>
|
||||
<a href="#437" id="437">437</a>
|
||||
<a href="#438" id="438">438</a>
|
||||
<a href="#439" id="439">439</a>
|
||||
<a href="#440" id="440">440</a>
|
||||
<a href="#441" id="441">441</a>
|
||||
</pre><pre class="rust"><code><span class="comment">// * This file is part of the uutils coreutils package.
|
||||
// *
|
||||
// * (c) Chirag B Jadwani <chirag.jadwani@gmail.com>
|
||||
@@ -453,15 +449,11 @@
|
||||
<span class="kw">use </span>std::str::FromStr;
|
||||
<span class="kw">use </span>uucore::display::Quotable;
|
||||
<span class="kw">use </span>uucore::error::{FromIo, UResult, USimpleError, UUsageError};
|
||||
<span class="kw">use </span>uucore::format_usage;
|
||||
<span class="kw">use </span>uucore::{format_usage, help_about, help_section, help_usage};
|
||||
|
||||
<span class="kw">const </span>ABOUT: <span class="kw-2">&</span>str = <span class="string">"Report or omit repeated lines."</span>;
|
||||
<span class="kw">const </span>USAGE: <span class="kw-2">&</span>str = <span class="string">"{} [OPTION]... [INPUT [OUTPUT]]..."</span>;
|
||||
<span class="kw">const </span>LONG_USAGE: <span class="kw-2">&</span>str = <span class="string">"\
|
||||
Filter adjacent matching lines from INPUT (or standard input),\n\
|
||||
writing to OUTPUT (or standard output).\n\n\
|
||||
Note: 'uniq' does not detect repeated lines unless they are adjacent.\n\
|
||||
You may want to sort the input first, or use 'sort -u' without 'uniq'."</span>;
|
||||
<span class="kw">const </span>ABOUT: <span class="kw-2">&</span>str = <span class="macro">help_about!</span>(<span class="string">"uniq.md"</span>);
|
||||
<span class="kw">const </span>USAGE: <span class="kw-2">&</span>str = <span class="macro">help_usage!</span>(<span class="string">"uniq.md"</span>);
|
||||
<span class="kw">const </span>AFTER_HELP: <span class="kw-2">&</span>str = <span class="macro">help_section!</span>(<span class="string">"after help"</span>, <span class="string">"uniq.md"</span>);
|
||||
|
||||
<span class="kw">pub mod </span>options {
|
||||
<span class="kw">pub static </span>ALL_REPEATED: <span class="kw-2">&</span>str = <span class="string">"all-repeated"</span>;
|
||||
@@ -688,7 +680,7 @@
|
||||
|
||||
<span class="attr">#[uucore::main]
|
||||
</span><span class="kw">pub fn </span>uumain(args: <span class="kw">impl </span>uucore::Args) -> UResult<()> {
|
||||
<span class="kw">let </span>matches = uu_app().after_help(LONG_USAGE).try_get_matches_from(args)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>matches = uu_app().after_help(AFTER_HELP).try_get_matches_from(args)<span class="question-mark">?</span>;
|
||||
|
||||
<span class="kw">let </span>files: Vec<String> = matches
|
||||
.get_many::<String>(ARG_FILES)
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user