This commit is contained in:
sylvestre
2023-03-20 02:47:14 +00:00
parent a0a89ebfb0
commit 63150aeb2a
13 changed files with 24 additions and 58 deletions
+2
View File
@@ -447,6 +447,7 @@
<a href="#447" id="447">447</a>
<a href="#448" id="448">448</a>
<a href="#449" id="449">449</a>
<a href="#450" id="450">450</a>
</pre><pre class="rust"><code><span class="comment">// This file is part of the uutils coreutils package.
//
// (c) Anthony Deschamps &lt;anthony.j.deschamps@gmail.com&gt;
@@ -763,6 +764,7 @@
Arg::new(OPT_RFC_3339)
.long(OPT_RFC_3339)
.value_name(<span class="string">&quot;FMT&quot;</span>)
.value_parser([DATE, SECOND, SECONDS, NS])
.help(RFC_3339_HELP_STRING),
)
.arg(
+3 -5
View File
@@ -293,7 +293,6 @@
<a href="#293" id="293">293</a>
<a href="#294" id="294">294</a>
<a href="#295" id="295">295</a>
<a href="#296" id="296">296</a>
</pre><pre class="rust"><code><span class="comment">// * This file is part of the uutils coreutils package.
// *
// * (c) Alex Lyon &lt;arcterus@mail.com&gt;
@@ -309,13 +308,12 @@
<span class="kw">use </span>std::path::Path;
<span class="kw">use </span>uucore::display::Quotable;
<span class="kw">use </span>uucore::error::{FromIo, UResult, USimpleError};
<span class="kw">use </span>uucore::format_usage;
<span class="kw">use </span>uucore::{format_usage, help_about, help_usage};
<span class="kw">const </span>TAB_WIDTH: usize = <span class="number">8</span>;
<span class="kw">static </span>USAGE: <span class="kw-2">&amp;</span>str = <span class="string">&quot;{} [OPTION]... [FILE]...&quot;</span>;
<span class="kw">static </span>ABOUT: <span class="kw-2">&amp;</span>str = <span class="string">&quot;Writes each file (or standard input if no files are given)
to standard output whilst breaking long lines&quot;</span>;
<span class="kw">const </span>USAGE: <span class="kw-2">&amp;</span>str = <span class="macro">help_usage!</span>(<span class="string">&quot;fold.md&quot;</span>);
<span class="kw">const </span>ABOUT: <span class="kw-2">&amp;</span>str = <span class="macro">help_about!</span>(<span class="string">&quot;fold.md&quot;</span>);
<span class="kw">mod </span>options {
<span class="kw">pub const </span>BYTES: <span class="kw-2">&amp;</span>str = <span class="string">&quot;bytes&quot;</span>;
+5 -39
View File
@@ -191,23 +191,6 @@
<a href="#191" id="191">191</a>
<a href="#192" id="192">192</a>
<a href="#193" id="193">193</a>
<a href="#194" id="194">194</a>
<a href="#195" id="195">195</a>
<a href="#196" id="196">196</a>
<a href="#197" id="197">197</a>
<a href="#198" id="198">198</a>
<a href="#199" id="199">199</a>
<a href="#200" id="200">200</a>
<a href="#201" id="201">201</a>
<a href="#202" id="202">202</a>
<a href="#203" id="203">203</a>
<a href="#204" id="204">204</a>
<a href="#205" id="205">205</a>
<a href="#206" id="206">206</a>
<a href="#207" id="207">207</a>
<a href="#208" id="208">208</a>
<a href="#209" id="209">209</a>
<a href="#210" id="210">210</a>
</pre><pre class="rust"><code><span class="comment">// This file is part of the uutils coreutils package.
//
// (c) Jian Zeng &lt;anonymousknight96@gmail.com&gt;
@@ -224,28 +207,11 @@
<span class="kw">use </span>uucore::display::Quotable;
<span class="kw">use </span>uucore::error::{set_exit_code, 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">static </span>ABOUT: <span class="kw-2">&amp;</span>str = <span class="string">&quot;Create the special file NAME of the given TYPE.&quot;</span>;
<span class="kw">static </span>USAGE: <span class="kw-2">&amp;</span>str = <span class="string">&quot;{} [OPTION]... NAME TYPE [MAJOR MINOR]&quot;</span>;
<span class="kw">static </span>LONG_HELP: <span class="kw-2">&amp;</span>str = <span class="string">&quot;Mandatory arguments to long options are mandatory for short options too.
-m, --mode=MODE set file permission bits to MODE, not a=rw - umask
--help display this help and exit
--version output version information and exit
Both MAJOR and MINOR must be specified when TYPE is b, c, or u, and they
must be omitted when TYPE is p. If MAJOR or MINOR begins with 0x or 0X,
it is interpreted as hexadecimal; otherwise, if it begins with 0, as octal;
otherwise, as decimal. TYPE may be:
b create a block (buffered) special file
c, u create a character (unbuffered) special file
p create a FIFO
NOTE: your shell may have its own version of mknod, which usually supersedes
the version described here. Please refer to your shell&#39;s documentation
for details about the options it supports.
&quot;</span>;
<span class="kw">const </span>ABOUT: <span class="kw-2">&amp;</span>str = <span class="macro">help_about!</span>(<span class="string">&quot;mknod.md&quot;</span>);
<span class="kw">const </span>USAGE: <span class="kw-2">&amp;</span>str = <span class="macro">help_usage!</span>(<span class="string">&quot;mknod.md&quot;</span>);
<span class="kw">const </span>AFTER_HELP: <span class="kw-2">&amp;</span>str = <span class="macro">help_section!</span>(<span class="string">&quot;after help&quot;</span>, <span class="string">&quot;mknod.md&quot;</span>);
<span class="kw">const </span>MODE_RW_UGO: mode_t = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
@@ -352,7 +318,7 @@ for details about the options it supports.
Command::new(uucore::util_name())
.version(<span class="macro">crate_version!</span>())
.override_usage(format_usage(USAGE))
.after_help(LONG_HELP)
.after_help(AFTER_HELP)
.about(ABOUT)
.infer_long_args(<span class="bool-val">true</span>)
.arg(
+3 -3
View File
@@ -595,7 +595,7 @@
</span><span class="kw">use </span>clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
<span class="kw">use </span>uucore::display::{println_verbatim, Quotable};
<span class="kw">use </span>uucore::error::{FromIo, UError, UResult, UUsageError};
<span class="kw">use </span>uucore::format_usage;
<span class="kw">use </span>uucore::{format_usage, help_about, help_usage};
<span class="kw">use </span>std::env;
<span class="kw">use </span>std::error::Error;
@@ -612,8 +612,8 @@
<span class="kw">use </span>rand::Rng;
<span class="kw">use </span>tempfile::Builder;
<span class="kw">static </span>ABOUT: <span class="kw-2">&amp;</span>str = <span class="string">&quot;Create a temporary file or directory.&quot;</span>;
<span class="kw">const </span>USAGE: <span class="kw-2">&amp;</span>str = <span class="string">&quot;{} [OPTION]... [TEMPLATE]&quot;</span>;
<span class="kw">const </span>ABOUT: <span class="kw-2">&amp;</span>str = <span class="macro">help_about!</span>(<span class="string">&quot;mktemp.md&quot;</span>);
<span class="kw">const </span>USAGE: <span class="kw-2">&amp;</span>str = <span class="macro">help_usage!</span>(<span class="string">&quot;mktemp.md&quot;</span>);
<span class="kw">static </span>DEFAULT_TEMPLATE: <span class="kw-2">&amp;</span>str = <span class="string">&quot;tmp.XXXXXXXXXX&quot;</span>;
+3 -3
View File
@@ -588,7 +588,7 @@
<span class="kw">use </span>std::fmt::Write;
<span class="kw">use </span>std::os::unix::fs::MetadataExt;
<span class="kw">use </span>std::path::PathBuf;
<span class="kw">use </span>uucore::format_usage;
<span class="kw">use </span>uucore::{format_usage, help_about, help_usage};
<span class="kw">mod </span>options {
<span class="kw">pub const </span>ALL: <span class="kw-2">&amp;</span>str = <span class="string">&quot;all&quot;</span>;
@@ -608,8 +608,8 @@
</span><span class="kw">pub const </span>FILE: <span class="kw-2">&amp;</span>str = <span class="string">&quot;FILE&quot;</span>; <span class="comment">// if length=1: FILE, if length=2: ARG1 ARG2
</span>}
<span class="kw">static </span>ABOUT: <span class="kw-2">&amp;</span>str = <span class="string">&quot;Print information about users who are currently logged in.&quot;</span>;
<span class="kw">const </span>USAGE: <span class="kw-2">&amp;</span>str = <span class="string">&quot;{} [OPTION]... [ FILE | ARG1 ARG2 ]&quot;</span>;
<span class="kw">const </span>ABOUT: <span class="kw-2">&amp;</span>str = <span class="macro">help_about!</span>(<span class="string">&quot;who.md&quot;</span>);
<span class="kw">const </span>USAGE: <span class="kw-2">&amp;</span>str = <span class="macro">help_usage!</span>(<span class="string">&quot;who.md&quot;</span>);
<span class="attr">#[cfg(target_os = <span class="string">&quot;linux&quot;</span>)]
</span><span class="kw">static </span>RUNLEVEL_HELP: <span class="kw-2">&amp;</span>str = <span class="string">&quot;print current runlevel&quot;</span>;
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