Skip to content

Commit ea4f09d

Browse files
committed
deploy: f0e8d44
1 parent 83cf621 commit ea4f09d

31 files changed

+128
-30
lines changed

dev/src/uu_more/more.rs.html

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,16 @@
563563
<a href="#563" id="563">563</a>
564564
<a href="#564" id="564">564</a>
565565
<a href="#565" id="565">565</a>
566+
<a href="#566" id="566">566</a>
567+
<a href="#567" id="567">567</a>
568+
<a href="#568" id="568">568</a>
569+
<a href="#569" id="569">569</a>
570+
<a href="#570" id="570">570</a>
571+
<a href="#571" id="571">571</a>
572+
<a href="#572" id="572">572</a>
573+
<a href="#573" id="573">573</a>
574+
<a href="#574" id="574">574</a>
575+
<a href="#575" id="575">575</a>
566576
</pre><pre class="rust"><code><span class="comment">// * This file is part of the uutils coreutils package.
567577
// *
568578
// * (c) Martin Kysel &lt;code@martinkysel.com&gt;
@@ -669,7 +679,17 @@
669679
<span class="kw">if </span>length &gt; <span class="number">1 </span>{
670680
buff.push_str(<span class="kw-2">&amp;</span>MULTI_FILE_TOP_PROMPT.replace(<span class="string">&quot;{}&quot;</span>, file.to_str().unwrap()));
671681
}
672-
<span class="kw">let </span><span class="kw-2">mut </span>reader = BufReader::new(File::open(file).unwrap());
682+
<span class="kw">let </span>opened_file = <span class="kw">match </span>File::open(file) {
683+
<span class="prelude-val">Err</span>(why) =&gt; {
684+
terminal::disable_raw_mode().unwrap();
685+
<span class="kw">return </span><span class="prelude-val">Err</span>(USimpleError::new(
686+
<span class="number">1</span>,
687+
<span class="macro">format!</span>(<span class="string">&quot;cannot open {}: {}&quot;</span>, file.quote(), why.kind()),
688+
));
689+
}
690+
<span class="prelude-val">Ok</span>(opened_file) =&gt; opened_file,
691+
};
692+
<span class="kw">let </span><span class="kw-2">mut </span>reader = BufReader::new(opened_file);
673693
reader.read_to_string(<span class="kw-2">&amp;mut </span>buff).unwrap();
674694
more(<span class="kw-2">&amp;</span>buff, <span class="kw-2">&amp;mut </span>stdout, next_file.copied(), <span class="kw-2">&amp;</span>options)<span class="question-mark">?</span>;
675695
buff.clear();

dev/src/uucore/features/perms.rs.html

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,45 @@
551551
<a href="#551" id="551">551</a>
552552
<a href="#552" id="552">552</a>
553553
<a href="#553" id="553">553</a>
554+
<a href="#554" id="554">554</a>
555+
<a href="#555" id="555">555</a>
556+
<a href="#556" id="556">556</a>
557+
<a href="#557" id="557">557</a>
558+
<a href="#558" id="558">558</a>
559+
<a href="#559" id="559">559</a>
560+
<a href="#560" id="560">560</a>
561+
<a href="#561" id="561">561</a>
562+
<a href="#562" id="562">562</a>
563+
<a href="#563" id="563">563</a>
564+
<a href="#564" id="564">564</a>
565+
<a href="#565" id="565">565</a>
566+
<a href="#566" id="566">566</a>
567+
<a href="#567" id="567">567</a>
568+
<a href="#568" id="568">568</a>
569+
<a href="#569" id="569">569</a>
570+
<a href="#570" id="570">570</a>
571+
<a href="#571" id="571">571</a>
572+
<a href="#572" id="572">572</a>
573+
<a href="#573" id="573">573</a>
574+
<a href="#574" id="574">574</a>
575+
<a href="#575" id="575">575</a>
576+
<a href="#576" id="576">576</a>
577+
<a href="#577" id="577">577</a>
578+
<a href="#578" id="578">578</a>
579+
<a href="#579" id="579">579</a>
580+
<a href="#580" id="580">580</a>
581+
<a href="#581" id="581">581</a>
582+
<a href="#582" id="582">582</a>
583+
<a href="#583" id="583">583</a>
584+
<a href="#584" id="584">584</a>
585+
<a href="#585" id="585">585</a>
586+
<a href="#586" id="586">586</a>
587+
<a href="#587" id="587">587</a>
588+
<a href="#588" id="588">588</a>
589+
<a href="#589" id="589">589</a>
590+
<a href="#590" id="590">590</a>
591+
<a href="#591" id="591">591</a>
592+
<a href="#592" id="592">592</a>
554593
</pre><pre class="rust"><code><span class="comment">// This file is part of the uutils coreutils package.
555594
//
556595
// For the full copyright and license information, please view the LICENSE
@@ -824,6 +863,11 @@
824863
</span>}
825864
}
826865
} <span class="kw">else </span>{
866+
<span class="self">self</span>.print_verbose_ownership_retained_as(
867+
path,
868+
meta.uid(),
869+
<span class="self">self</span>.dest_gid.map(|<span class="kw">_</span>| meta.gid()),
870+
);
827871
<span class="number">0
828872
</span>};
829873

@@ -885,6 +929,11 @@
885929
};
886930

887931
<span class="kw">if </span>!<span class="self">self</span>.matched(meta.uid(), meta.gid()) {
932+
<span class="self">self</span>.print_verbose_ownership_retained_as(
933+
path,
934+
meta.uid(),
935+
<span class="self">self</span>.dest_gid.map(|<span class="kw">_</span>| meta.gid()),
936+
);
888937
<span class="kw">continue</span>;
889938
}
890939

@@ -946,6 +995,35 @@
946995
IfFrom::UserGroup(u, g) =&gt; u == uid &amp;&amp; g == gid,
947996
}
948997
}
998+
999+
<span class="kw">fn </span>print_verbose_ownership_retained_as(<span class="kw-2">&amp;</span><span class="self">self</span>, path: <span class="kw-2">&amp;</span>Path, uid: u32, gid: <span class="prelude-ty">Option</span>&lt;u32&gt;) {
1000+
<span class="kw">if </span><span class="self">self</span>.verbosity.level == VerbosityLevel::Verbose {
1001+
<span class="kw">match </span>(<span class="self">self</span>.dest_uid, <span class="self">self</span>.dest_gid, gid) {
1002+
(<span class="prelude-val">Some</span>(<span class="kw">_</span>), <span class="prelude-val">Some</span>(<span class="kw">_</span>), <span class="prelude-val">Some</span>(gid)) =&gt; {
1003+
<span class="macro">println!</span>(
1004+
<span class="string">&quot;ownership of {} retained as {}:{}&quot;</span>,
1005+
path.quote(),
1006+
entries::uid2usr(uid).unwrap_or_else(|<span class="kw">_</span>| uid.to_string()),
1007+
entries::gid2grp(gid).unwrap_or_else(|<span class="kw">_</span>| gid.to_string()),
1008+
);
1009+
}
1010+
(<span class="prelude-val">None</span>, <span class="prelude-val">Some</span>(<span class="kw">_</span>), <span class="prelude-val">Some</span>(gid)) =&gt; {
1011+
<span class="macro">println!</span>(
1012+
<span class="string">&quot;ownership of {} retained as {}&quot;</span>,
1013+
path.quote(),
1014+
entries::gid2grp(gid).unwrap_or_else(|<span class="kw">_</span>| gid.to_string()),
1015+
);
1016+
}
1017+
(<span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) =&gt; {
1018+
<span class="macro">println!</span>(
1019+
<span class="string">&quot;ownership of {} retained as {}&quot;</span>,
1020+
path.quote(),
1021+
entries::uid2usr(uid).unwrap_or_else(|<span class="kw">_</span>| uid.to_string()),
1022+
);
1023+
}
1024+
}
1025+
}
1026+
}
9491027
}
9501028

9511029
<span class="kw">pub mod </span>options {

dev/uu_more/fn.uu_app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `uu_app` fn in crate `uu_more`."><title>uu_app in uu_more - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-c4dbdcde0fbd8430.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../static.files/light-db279b6232be9c13.css"><link rel="stylesheet" disabled href="../static.files/dark-cf923f49f397b216.css"><link rel="stylesheet" disabled href="../static.files/ayu-be46fdc453a55015.css"><script src="../static.files/storage-3891ce972e3a2bf8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-98a684e84ae5b08b.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../uu_more/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../uu_more/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In uu_more</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="index.html">uu_more</a>::<wbr><a class="fn" href="#">uu_app</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/uu_more/more.rs.html#124-218">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn uu_app() -&gt; Command</code></pre></section></div></main><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="uu_more" data-themes="" data-resource-suffix="" data-rustdoc-version="1.69.0 (84c898d65 2023-04-16)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>
1+
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `uu_app` fn in crate `uu_more`."><title>uu_app in uu_more - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-c4dbdcde0fbd8430.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../static.files/light-db279b6232be9c13.css"><link rel="stylesheet" disabled href="../static.files/dark-cf923f49f397b216.css"><link rel="stylesheet" disabled href="../static.files/ayu-be46fdc453a55015.css"><script src="../static.files/storage-3891ce972e3a2bf8.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-98a684e84ae5b08b.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../uu_more/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../uu_more/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In uu_more</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="index.html">uu_more</a>::<wbr><a class="fn" href="#">uu_app</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/uu_more/more.rs.html#134-228">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn uu_app() -&gt; Command</code></pre></section></div></main><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="uu_more" data-themes="" data-resource-suffix="" data-rustdoc-version="1.69.0 (84c898d65 2023-04-16)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>

0 commit comments

Comments
 (0)