Commit bb58904f authored by Jeremy Soller's avatar Jeremy Soller

Merge branch 'master' into strace

parents 20b71a4a b25b7e47
......@@ -9,18 +9,18 @@ dependencies = [
[[package]]
name = "extra"
version = "0.1.0"
source = "git+https://github.com/redox-os/libextra.git#1ace7bd1204b3056094fa42c7f7a2f2e0bb50499"
source = "git+https://github.com/redox-os/libextra.git#3946ef278d993904a4747ace68e8ca0b69717074"
[[package]]
name = "libc"
version = "0.2.8"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "termion"
version = "0.1.0"
source = "git+https://github.com/Ticki/termion.git#28a95cf447b862b1660abd417c2325b2447f49df"
source = "git+https://github.com/Ticki/termion.git#119cbda7186dd594146b1568100247aaaf417bdc"
dependencies = [
"libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
......@@ -3,10 +3,6 @@ name = "extrautils"
version = "0.1.0"
authors = ["Ticki <Ticki@users.noreply.github.com>"]
[[bin]]
name = "mtxt"
path = "src/bin/mtxt.rs"
[[bin]]
name = "calc"
path = "src/bin/calc.rs"
......@@ -27,10 +23,22 @@ path = "src/bin/grep.rs"
name = "less"
path = "src/bin/less.rs"
[[bin]]
name = "man"
path = "src/bin/man.rs"
[[bin]]
name = "mtxt"
path = "src/bin/mtxt.rs"
[[bin]]
name = "rem"
path = "src/bin/rem.rs"
[[bin]]
name = "watch"
path = "src/bin/watch.rs"
[[bin]]
name = "wget"
path = "src/bin/wget.rs"
......
......@@ -9,37 +9,56 @@ use std::hash::Hasher;
use std::io::{Write, Read, stdin, stdout, stderr};
use std::mem;
static HELP: &'static str = r#"
NAME
cksum - calculate the DJB2 checksum of the input.
SYNOPSIS
cksum [-h | --help] [-b | --binary] [FILE 1] [FILE 2]...
DESCRIPTION
This utility is used for calculating the checksum from one or more byte streams (files and/or standard input). The ordering of the arguments do matter.
'cksum' differs from the Unix version in multiple ways. Most importantly: it uses DJB2, a streaming non-cryptographic hash function.
'cksum' defaults to hexadecimal.
NOTA BENE: This tool should **never** be used as a secure hash function, since DJB2 is non-cryptographic, and easily breakable.
OPTIONS
-h
--help
Print this manual page.
-b
--binary
Print the output in base 256.
AUTHOR
This program was written by Ticki for Redox OS. Bugs, issues, or feature requests should be reported in the Github repository, 'redox-os/extrautils'.
COPYRIGHT
Copyright (c) 2016 Ticki
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"#;
static HELP: &'static str = /* @MANSTART{cksum} */ r#"
NAME
cksum - calculate the DJB2 checksum of the input.
SYNOPSIS
cksum [-h | --help] [-b | --binary] [FILE 1] [FILE 2]...
DESCRIPTION
This utility is used for calculating the checksum from one or more byte streams (files and/or
standard input). The ordering of the arguments do matter.
'cksum' differs from the Unix version in multiple ways. Most importantly: it uses DJB2, a
streaming non-cryptographic hash function.
'cksum' defaults to hexadecimal.
NOTA BENE: This tool should **never** be used as a secure hash function, since DJB2 is
non-cryptographic, and easily breakable.
OPTIONS
-h
--help
Print this manual page.
-b
--binary
Print the output in base 256.
AUTHOR
This program was written by Ticki for Redox OS. Bugs, issues, or feature requests should be
reported in the Github repository, 'redox-os/extrautils'.
COPYRIGHT
Copyright (c) 2016 Ticki
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"#; /* @MANEND */
pub struct Djb2 {
state: u64,
......
......@@ -8,30 +8,46 @@ use std::io::{self, Write, Read};
use extra::option::OptionalExt;
use extra::io::fail;
static HELP: &'static str = r#"
NAME
cur - freely move you cursor using H, J, K, and L (Vi-bindings).
SYNOPSIS
mtxt [-h | --help]
DESCRIPTION
This utility will let you navigate the terminal cursor using standard Vi bindings (h, j, k, and l) by using ANSI escape codes.
In combination with other tools, this can be used as a very simple pager.
OPTIONS
-h
--help
Print this manual page.
AUTHOR
This program was written by Ticki for Redox OS. Bugs, issues, or feature requests should be reported in the Github repository, 'redox-os/extrautils'.
COPYRIGHT
Copyright (c) 2016 Ticki
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"#;
static HELP: &'static str = /* @MANSTART{cur} */ r#"
NAME
cur - freely move you cursor using H, J, K, and L (Vi-bindings).
SYNOPSIS
cur [-h | --help]
DESCRIPTION
This utility will let you navigate the terminal cursor using standard Vi bindings (h, j, k, and
l) by using ANSI escape codes.
In combination with other tools, this can be used as a very simple pager.
OPTIONS
-h
--help
Print this manual page.
AUTHOR
This program was written by Ticki for Redox OS. Bugs, issues, or feature requests should be
reported in the Github repository, 'redox-os/extrautils'.
COPYRIGHT
Copyright (c) 2016 Ticki
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"#; /* @MANEND */
fn csi<T: Write>(stdout: &mut T, other: &str) {
// Print CSI (control sequence introducer)
......
......@@ -12,23 +12,26 @@ use std::process::exit;
use extra::option::OptionalExt;
use extra::io::WriteExt;
static MAN_PAGE: &'static str = r#"
NAME
grep - print lines matching a pattern
SYNOPSIS
grep [-h | --help] [-n --line-number] PATTERN [FILE...]
DESCRIPTION
grep searches the named input FILEs for lines containing a match to the given PATTERN. If no files are specified, grep searches the standard input. grep prints the matching lines.
static MAN_PAGE: &'static str = /* @MANSTART{grep} */ r#"
NAME
grep - print lines matching a pattern
OPTIONS
-h
--help
Print this manual page.
SYNOPSIS
grep [-h | --help] [-n --line-number] PATTERN [FILE...]
-n
--line-number
Prefix each line of output with the line number of the match.
"#;
DESCRIPTION
grep searches the named input FILEs for lines containing a match to the given PATTERN. If no
files are specified, grep searches the standard input. grep prints the matching lines.
OPTIONS
-h
--help
Print this manual page.
-n
--line-number
Prefix each line of output with the line number of the match.
"#; /* @MANEND */
#[derive(Copy, Clone)]
struct Flags {
......
......@@ -14,27 +14,43 @@ use extra::option::OptionalExt;
use termion::{terminal_size, TermRead, TermWrite, IntoRawMode, Color, Key, RawTerminal};
static LONG_HELP: &'static str = r#"
NAME
less - view a text file.
SYNOPSIS
less [-h | --help] [input]
DESCRIPTION
This utility views text files. If no input file is specified as an argument, standard input is used.
OPTIONS
--help, -h
Print this manual page.
AUTHOR
This program was written by MovingtoMars for Redox OS. Bugs, issues, or feature requests should be reported in the Github repository, 'redox-os/extrautils'.
COPYRIGHT
Copyright (c) 2016 MovingtoMars
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"#;
static LONG_HELP: &'static str = /* @MANSTART{less} */ r#"
NAME
less - view a text file.
SYNOPSIS
less [-h | --help] [input]
DESCRIPTION
This utility views text files. If no input file is specified as an argument, standard input is
used.
OPTIONS
--help, -h
Print this manual page.
AUTHOR
This program was written by MovingtoMars for Redox OS. Bugs, issues, or feature requests should
be reported in the Github repository, 'redox-os/extrautils'.
COPYRIGHT
Copyright (c) 2016 MovingtoMars
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"#; /* @MANEND */
fn main() {
let mut args = args().skip(1);
......@@ -53,13 +69,13 @@ fn main() {
},
filename => {
let mut file = File::open(Path::new(filename)).try(&mut stderr);
run(&mut file, &mut stdin, &mut stdout, &mut stderr);
run(filename, &mut file, &mut stdin, &mut stdout, &mut stderr);
}
}
if let Some(x) = args.next() {
let mut file = File::open(Path::new(x.as_str())).try(&mut stderr);
run(&mut file, &mut stdin, &mut stdout, &mut stderr);
run(x.as_str(), &mut file, &mut stdin, &mut stdout, &mut stderr);
}
} else {
writeln!(stderr, "Readin from stdin is not yet supported").try(&mut stderr);
......@@ -138,7 +154,7 @@ impl Buffer {
}
}
fn run(file: &mut Read, controls: &mut Read, stdout: &mut StdoutLock, stderr: &mut Stderr) {
fn run(path: &str, file: &mut Read, controls: &mut Read, stdout: &mut StdoutLock, stderr: &mut Stderr) {
let mut stdout = stdout.into_raw_mode().try(stderr);
let (w, h) = {
......@@ -156,7 +172,8 @@ fn run(file: &mut Read, controls: &mut Read, stdout: &mut StdoutLock, stderr: &m
stdout.goto(0, h - 1).try(stderr);
stdout.bg_color(Color::White).try(stderr);
stdout.color(Color::Black).try(stderr);
stdout.write(b"Press q to exit.").try(stderr);
stdout.write(path.as_bytes()).try(stderr);
stdout.write(b" Press q to exit.").try(stderr);
stdout.reset().try(stderr);
stdout.flush().try(stderr);
......@@ -179,7 +196,8 @@ fn run(file: &mut Read, controls: &mut Read, stdout: &mut StdoutLock, stderr: &m
stdout.goto(0, h - 1).try(stderr);
stdout.bg_color(Color::White).try(stderr);
stdout.color(Color::Black).try(stderr);
stdout.write(b"Press q to exit.").try(stderr);
stdout.write(path.as_bytes()).try(stderr);
stdout.write(b" Press q to exit.").try(stderr);
stdout.reset().try(stderr);
stdout.flush().try(stderr);
}
......
use std::env;
use std::io::{stdout, stderr, Write};
use std::process::{self, Command};
static HELP: &'static str = /* @MANSTART{man} */ r#"
NAME
man - view a man page.
SYNOPSIS
man [-h | --help] [page]
DESCRIPTION
This utility launches less with a manual file.
OPTIONS
--help, -h
Print this manual page.
AUTHOR
This program was written by Jeremy Soller for Redox OS. Bugs, issues, or feature requests
should be reported in the Github repository, 'redox-os/extrautils'.
COPYRIGHT
Copyright (c) 2016 Jeremy Soller
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"#; /* @MANEND */
fn main() {
if let Some(arg) = env::args().nth(1) {
match arg.as_str() {
"--help" | "-h" => {
// Print help.
stdout().write(HELP.as_bytes()).unwrap();
return;
},
page => {
Command::new("less").arg(&("/ref/".to_owned() + page)).spawn().unwrap().wait().unwrap();
}
}
} else {
stderr().write(b"Which manual page do you want?\n").unwrap();
process::exit(1);
}
}
......@@ -10,45 +10,65 @@ use std::process::exit;
use extra::option::OptionalExt;
use extra::io::{fail, WriteExt};
static HELP: &'static str = r#"
NAME
mtxt - a simple tool to manipulate text from standard input.
SYNOPSIS
mtxt [-h | --help | -u | --to-uppercase-w | -l | --to-lowercase | -a | --strip-non-ascii]
DESCRIPTION
This utility will manipulate UTF-8 encoded text from the standard input. Unicode is supported. The flags are composable, unless otherwise stated.
OPTIONS
-h
--help
Print this manual page.
-u
--to-uppercase
Convert the input to UPPERCASE. Works correctly with Unicode. Incompatible with '-l'.
-l
--lowercase
Convert the input to lowercase. Works correctly with Unicode.
-a
--strip-non-ascii
Strip the input for non-ASCII bytes, outputting a valid ASCII string.
EXAMPLES
$ echo Δ | mtxt -l
> δ
$ echo we got deltas Δ right | mtxt -a
> we got deltas right
$ echo Japanese scripts do not have case thus 山will stay unchanged | mtxt -u
> JAPANESE SCRIPTS DO NOT HAVE CASE THUS 山WILL STAY UNCHANGED
AUTHOR
This program was written by Ticki for Redox OS. Bugs, issues, or feature requests should be reported in the Github repository, 'redox-os/extrautils'.
COPYRIGHT
Copyright (c) 2016 Ticki
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Do you actually read the license? wat?
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"#;
static HELP: &'static str = /* @MANSTART{mtxt} */ r#"
NAME
mtxt - a simple tool to manipulate text from standard input.
SYNOPSIS
mtxt [-h | --help | -u | --to-uppercase-w | -l | --to-lowercase | -a | --strip-non-ascii]
DESCRIPTION
This utility will manipulate UTF-8 encoded text from the standard input. Unicode is supported.
The flags are composable, unless otherwise stated.
OPTIONS
-h
--help
Print this manual page.
-u
--to-uppercase
Convert the input to UPPERCASE. Works correctly with Unicode. Incompatible with '-l'.
-l
--lowercase
Convert the input to lowercase. Works correctly with Unicode.
-a
--strip-non-ascii
Strip the input for non-ASCII bytes, outputting a valid ASCII string.
EXAMPLES
$ echo Δ | mtxt -l
> δ
$ echo we got deltas Δ right | mtxt -a
> we got deltas right
$ echo Japanese scripts do not have case thus 山will stay unchanged | mtxt -u
> JAPANESE SCRIPTS DO NOT HAVE CASE THUS 山WILL STAY UNCHANGED
AUTHOR
This program was written by Ticki for Redox OS. Bugs, issues, or feature requests should be
reported in the Github repository, 'redox-os/extrautils'.
COPYRIGHT
Copyright (c) 2016 Ticki
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
Do you actually read the license? wat?
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"#; /* @MANEND */
fn main() {
let stdin = io::stdin();
......
......@@ -10,47 +10,71 @@ use std::time::Duration;
use extra::option::OptionalExt;
static LONG_HELP: &'static str = r#"
NAME
rem - set a count-down.
SYNOPSIS
rem [-h | --help] [-m N | --minutes N] [-H N | --hours N] [-s N | --seconds N] [-M N | --milliseconds N] [-n | --len] [-b | --blink]
DESCRIPTION
This utility lets you set a count-down with a progress bar. The options can be given in combination, adding together the durations given.
OPTIONS
--help
Print this manual page.
-h
Print short help page.
-m N
--minutes N
Wait N minutes.
-H N
--hours N
Wait N hours.
-s N
--seconds N
Wait N seconds.
-M N
--milliseconds N
Wait N milliseconds.
-n N
--len N
Set the length of the progress bar to N.
-b
--blink
Blink with a red banner when done.
AUTHOR
This program was written by Ticki for Redox OS. Bugs, issues, or feature requests should be reported in the Github repository, 'redox-os/extrautils'.
COPYRIGHT
Copyright (c) 2016 Ticki
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"#;
static LONG_HELP: &'static str = /* @MANSTART{rem} */ r#"
NAME
rem - set a count-down.
SYNOPSIS
rem [-h | --help] [-m N | --minutes N] [-H N | --hours N] [-s N | --seconds N]
[-M N | --milliseconds N] [-n | --len] [-b | --blink]
DESCRIPTION
This utility lets you set a count-down with a progress bar. The options can be given in
combination, adding together the durations given.
OPTIONS
--help
Print this manual page.
-h
Print short help page.
-m N
--minutes N
Wait N minutes.
-H N
--hours N
Wait N hours.
-s N
--seconds N
Wait N seconds.
-M N
--milliseconds N
Wait N milliseconds.
-n N
--len N
Set the length of the progress bar to N.
-b
--blink
Blink with a red banner when done.
AUTHOR
This program was written by Ticki for Redox OS. Bugs, issues, or feature requests should be
reported in the Github repository, 'redox-os/extrautils'.
COPYRIGHT
Copyright (c) 2016 Ticki
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"#; /* @MANEND */