From eb131ff8234e2058bd6a982c463197ab19be04ec Mon Sep 17 00:00:00 2001 From: sylvestre Date: Sat, 29 Apr 2023 02:34:49 +0000 Subject: [PATCH] deploy: f0e8d44e6e64ee3354f95864c0a25b74cf1c1151 --- dev/coreutils/fn.gen_completions.html | 2 +- dev/coreutils/fn.gen_coreutils_app.html | 2 +- dev/coreutils/fn.gen_manpage.html | 2 +- dev/coreutils/fn.main.html | 2 +- dev/coreutils/fn.name.html | 2 +- dev/coreutils/fn.not_found.html | 2 +- dev/coreutils/index.html | 2 +- dev/search-index.js | 2 +- dev/src/coreutils/coreutils.rs.html | 12 +++++++++--- dev/src/uu_paste/paste.rs.html | 22 +++++++++++++++++++--- dev/src/uu_sum/sum.rs.html | 8 +++----- dev/uu_paste/index.html | 2 +- dev/uu_sum/fn.uu_app.html | 2 +- dev/uu_sum/fn.uumain.html | 2 +- dev/uu_sum/index.html | 2 +- 15 files changed, 43 insertions(+), 23 deletions(-) diff --git a/dev/coreutils/fn.gen_completions.html b/dev/coreutils/fn.gen_completions.html index 9c5f2d00b..e46334159 100644 --- a/dev/coreutils/fn.gen_completions.html +++ b/dev/coreutils/fn.gen_completions.html @@ -1,4 +1,4 @@ -gen_completions in coreutils - Rust

Function coreutils::gen_completions

source ·
pub(crate) fn gen_completions<T: Args>(
+gen_completions in coreutils - Rust

Function coreutils::gen_completions

source ·
pub(crate) fn gen_completions<T: Args>(
     args: impl Iterator<Item = OsString>,
     util_map: &Map<&'static str, (fn(_: T) -> i32, fn() -> Command)>
 ) -> !
Expand description

Prints completions for the utility in the first parameter for the shell in the second parameter to stdout

diff --git a/dev/coreutils/fn.gen_coreutils_app.html b/dev/coreutils/fn.gen_coreutils_app.html index 83640b243..e49322847 100644 --- a/dev/coreutils/fn.gen_coreutils_app.html +++ b/dev/coreutils/fn.gen_coreutils_app.html @@ -1,3 +1,3 @@ -gen_coreutils_app in coreutils - Rust
pub(crate) fn gen_coreutils_app<T: Args>(
+gen_coreutils_app in coreutils - Rust
pub(crate) fn gen_coreutils_app<T: Args>(
     util_map: &Map<&'static str, (fn(_: T) -> i32, fn() -> Command)>
 ) -> Command
\ No newline at end of file diff --git a/dev/coreutils/fn.gen_manpage.html b/dev/coreutils/fn.gen_manpage.html index f7a71a213..821302854 100644 --- a/dev/coreutils/fn.gen_manpage.html +++ b/dev/coreutils/fn.gen_manpage.html @@ -1,4 +1,4 @@ -gen_manpage in coreutils - Rust

Function coreutils::gen_manpage

source ·
pub(crate) fn gen_manpage<T: Args>(
+gen_manpage in coreutils - Rust

Function coreutils::gen_manpage

source ·
pub(crate) fn gen_manpage<T: Args>(
     args: impl Iterator<Item = OsString>,
     util_map: &Map<&'static str, (fn(_: T) -> i32, fn() -> Command)>
 ) -> !
Expand description

Generate the manpage for the utility in the first parameter

diff --git a/dev/coreutils/fn.main.html b/dev/coreutils/fn.main.html index 46d3cb8f2..ea9e8d209 100644 --- a/dev/coreutils/fn.main.html +++ b/dev/coreutils/fn.main.html @@ -1 +1 @@ -main in coreutils - Rust

Function coreutils::main

source ·
pub(crate) fn main()
\ No newline at end of file +main in coreutils - Rust

Function coreutils::main

source ·
pub(crate) fn main()
\ No newline at end of file diff --git a/dev/coreutils/fn.name.html b/dev/coreutils/fn.name.html index b0f00a868..16524c374 100644 --- a/dev/coreutils/fn.name.html +++ b/dev/coreutils/fn.name.html @@ -1 +1 @@ -name in coreutils - Rust

Function coreutils::name

source ·
pub(crate) fn name(binary_path: &Path) -> &str
\ No newline at end of file +name in coreutils - Rust

Function coreutils::name

source ·
pub(crate) fn name(binary_path: &Path) -> Option<&str>
\ No newline at end of file diff --git a/dev/coreutils/fn.not_found.html b/dev/coreutils/fn.not_found.html index b5499cc4f..3587b79dd 100644 --- a/dev/coreutils/fn.not_found.html +++ b/dev/coreutils/fn.not_found.html @@ -1 +1 @@ -not_found in coreutils - Rust

Function coreutils::not_found

source ·
pub(crate) fn not_found(util: &OsStr) -> !
\ No newline at end of file +not_found in coreutils - Rust

Function coreutils::not_found

source ·
pub(crate) fn not_found(util: &OsStr) -> !
\ No newline at end of file diff --git a/dev/coreutils/index.html b/dev/coreutils/index.html index 8fffd5053..f3067e7ce 100644 --- a/dev/coreutils/index.html +++ b/dev/coreutils/index.html @@ -1 +1 @@ -coreutils - Rust

Crate coreutils

source ·

Constants

Functions

Type Definitions

\ No newline at end of file +coreutils - Rust

Crate coreutils

source ·

Constants

Functions

Type Definitions

\ No newline at end of file diff --git a/dev/search-index.js b/dev/search-index.js index b006a8ed0..d360d9aef 100644 --- a/dev/search-index.js +++ b/dev/search-index.js @@ -12,7 +12,7 @@ var searchIndex = JSON.parse('{\ "chroot":{"doc":"","t":"F","n":["main"],"q":["chroot"],"d":[""],"i":[0],"f":[[[]]],"p":[]},\ "cksum":{"doc":"","t":"F","n":["main"],"q":["cksum"],"d":[""],"i":[0],"f":[[[]]],"p":[]},\ "comm":{"doc":"","t":"F","n":["main"],"q":["comm"],"d":[""],"i":[0],"f":[[[]]],"p":[]},\ -"coreutils":{"doc":"","t":"GRFFFFFFFFF","n":["UtilityMap","VERSION","binary_path","gen_completions","gen_coreutils_app","gen_manpage","main","name","not_found","usage","util_map"],"q":["coreutils","","","","","","","","","",""],"d":["","","","Prints completions for the utility in the first parameter …","","Generate the manpage for the utility in the first parameter","","","","",""],"i":[0,0,0,0,0,0,0,0,0,0,0],"f":[0,0,[[],1],[[2,3],4],[3,5],[[2,3],4],[[]],[6,7],[8,4],[[3,7]],[[],[[3,[7]]]]],"p":[[3,"PathBuf"],[8,"Iterator"],[3,"Map"],[15,"never"],[3,"Command"],[3,"Path"],[15,"str"],[3,"OsStr"]]},\ +"coreutils":{"doc":"","t":"GRFFFFFFFFF","n":["UtilityMap","VERSION","binary_path","gen_completions","gen_coreutils_app","gen_manpage","main","name","not_found","usage","util_map"],"q":["coreutils","","","","","","","","","",""],"d":["","","","Prints completions for the utility in the first parameter …","","Generate the manpage for the utility in the first parameter","","","","",""],"i":[0,0,0,0,0,0,0,0,0,0,0],"f":[0,0,[[],1],[[2,3],4],[3,5],[[2,3],4],[[]],[6,[[8,[7]]]],[9,4],[[3,7]],[[],[[3,[7]]]]],"p":[[3,"PathBuf"],[8,"Iterator"],[3,"Map"],[15,"never"],[3,"Command"],[3,"Path"],[15,"str"],[4,"Option"],[3,"OsStr"]]},\ "cp":{"doc":"","t":"F","n":["main"],"q":["cp"],"d":[""],"i":[0],"f":[[[]]],"p":[]},\ "csplit":{"doc":"","t":"F","n":["main"],"q":["csplit"],"d":[""],"i":[0],"f":[[[]]],"p":[]},\ "cut":{"doc":"","t":"F","n":["main"],"q":["cut"],"d":[""],"i":[0],"f":[[[]]],"p":[]},\ diff --git a/dev/src/coreutils/coreutils.rs.html b/dev/src/coreutils/coreutils.rs.html index df6f8a0a8..021f86def 100644 --- a/dev/src/coreutils/coreutils.rs.html +++ b/dev/src/coreutils/coreutils.rs.html @@ -213,6 +213,9 @@ 213 214 215 +216 +217 +218
// This file is part of the uutils coreutils package.
 //
 // (c) Michael Gehring <mg@ebfe.org>
@@ -258,8 +261,8 @@
     }
 }
 
-fn name(binary_path: &Path) -> &str {
-    binary_path.file_stem().unwrap().to_str().unwrap()
+fn name(binary_path: &Path) -> Option<&str> {
+    binary_path.file_stem()?.to_str()
 }
 
 fn main() {
@@ -269,7 +272,10 @@
     let mut args = uucore::args_os();
 
     let binary = binary_path(&mut args);
-    let binary_as_util = name(&binary);
+    let binary_as_util = name(&binary).unwrap_or_else(|| {
+        usage(&utils, "<unknown binary name>");
+        process::exit(0);
+    });
 
     // binary name equals util name?
     if let Some(&(uumain, _)) = utils.get(binary_as_util) {
diff --git a/dev/src/uu_paste/paste.rs.html b/dev/src/uu_paste/paste.rs.html
index b9858dfaf..8f979472a 100644
--- a/dev/src/uu_paste/paste.rs.html
+++ b/dev/src/uu_paste/paste.rs.html
@@ -229,6 +229,14 @@
 229
 230
 231
+232
+233
+234
+235
+236
+237
+238
+239
 
//  * This file is part of the uutils coreutils package.
 //  *
 //  * (c) Alex Lyon <arcterus@mail.com>
@@ -243,7 +251,7 @@
 use std::fs::File;
 use std::io::{stdin, stdout, BufRead, BufReader, Read, Write};
 use std::path::Path;
-use uucore::error::{FromIo, UResult};
+use uucore::error::{FromIo, UResult, USimpleError};
 use uucore::{format_usage, help_about, help_usage};
 
 const ABOUT: &str = help_about!("paste.md");
@@ -360,6 +368,16 @@
         files.push(file);
     }
 
+    if delimiters.ends_with('\\') && !delimiters.ends_with("\\\\") {
+        return Err(USimpleError::new(
+            1,
+            format!(
+                "delimiter list ends with an unescaped backslash: {}",
+                delimiters
+            ),
+        ));
+    }
+
     let delimiters: Vec<char> = unescape(delimiters).chars().collect();
     let mut delim_count = 0;
     let mut delim_length = 1;
@@ -453,12 +471,10 @@
 }
 
 // Unescape all special characters
-// TODO: this will need work to conform to GNU implementation
 fn unescape(s: &str) -> String {
     s.replace("\\n", "\n")
         .replace("\\t", "\t")
         .replace("\\\\", "\\")
-        .replace('\\', "")
 }
 
\ No newline at end of file diff --git a/dev/src/uu_sum/sum.rs.html b/dev/src/uu_sum/sum.rs.html index 25ab56315..87a6143ac 100644 --- a/dev/src/uu_sum/sum.rs.html +++ b/dev/src/uu_sum/sum.rs.html @@ -167,7 +167,6 @@ 167 168 169 -170
// * This file is part of the uutils coreutils package.
 // *
 // * (c) T. Jameson Little <t.jameson.little@gmail.com>
@@ -183,11 +182,10 @@
 use std::path::Path;
 use uucore::display::Quotable;
 use uucore::error::{FromIo, UResult, USimpleError};
-use uucore::{format_usage, show};
+use uucore::{format_usage, help_about, help_usage, show};
 
-static USAGE: &str = "{} [OPTION]... [FILE]...";
-static ABOUT: &str = "Checksum and count the blocks in a file.\n\n\
-                      With no FILE, or when FILE is -, read standard input.";
+const USAGE: &str = help_usage!("sum.md");
+const ABOUT: &str = help_about!("sum.md");
 
 // This can be replaced with usize::div_ceil once it is stabilized.
 // This implementation approach is optimized for when `b` is a constant,
diff --git a/dev/uu_paste/index.html b/dev/uu_paste/index.html
index e20bc9d56..73056ccb8 100644
--- a/dev/uu_paste/index.html
+++ b/dev/uu_paste/index.html
@@ -1 +1 @@
-uu_paste - Rust
\ No newline at end of file +uu_paste - Rust
\ No newline at end of file diff --git a/dev/uu_sum/fn.uu_app.html b/dev/uu_sum/fn.uu_app.html index 99f80fe41..6b4d56d00 100644 --- a/dev/uu_sum/fn.uu_app.html +++ b/dev/uu_sum/fn.uu_app.html @@ -1 +1 @@ -uu_app in uu_sum - Rust

Function uu_sum::uu_app

source ·
pub fn uu_app() -> Command
\ No newline at end of file +uu_app in uu_sum - Rust

Function uu_sum::uu_app

source ·
pub fn uu_app() -> Command
\ No newline at end of file diff --git a/dev/uu_sum/fn.uumain.html b/dev/uu_sum/fn.uumain.html index a7011480a..82b1d4973 100644 --- a/dev/uu_sum/fn.uumain.html +++ b/dev/uu_sum/fn.uumain.html @@ -1 +1 @@ -uumain in uu_sum - Rust

Function uu_sum::uumain

source ·
pub fn uumain(args: impl Args) -> i32
\ No newline at end of file +uumain in uu_sum - Rust

Function uu_sum::uumain

source ·
pub fn uumain(args: impl Args) -> i32
\ No newline at end of file diff --git a/dev/uu_sum/index.html b/dev/uu_sum/index.html index 80a921488..5848acbfc 100644 --- a/dev/uu_sum/index.html +++ b/dev/uu_sum/index.html @@ -1 +1 @@ -uu_sum - Rust
\ No newline at end of file +uu_sum - Rust
\ No newline at end of file