Skip to content

Commit

Permalink
Merge pull request #2300 from tertsdiepraam/pr
Browse files Browse the repository at this point in the history
Implement `pr` (resurrection of the resurrected PR)
  • Loading branch information
sylvestre committed May 31, 2021
2 parents 15da98d + 7690dc0 commit badf7aa
Show file tree
Hide file tree
Showing 49 changed files with 9,968 additions and 23 deletions.
51 changes: 35 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ feat_common_core = [
"nl",
"od",
"paste",
"pr",
"printenv",
"printf",
"ptx",
Expand Down Expand Up @@ -285,6 +286,7 @@ od = { optional=true, version="0.0.6", package="uu_od", path="src/uu/od" }
paste = { optional=true, version="0.0.6", package="uu_paste", path="src/uu/paste" }
pathchk = { optional=true, version="0.0.6", package="uu_pathchk", path="src/uu/pathchk" }
pinky = { optional=true, version="0.0.6", package="uu_pinky", path="src/uu/pinky" }
pr = { optional=true, version="0.0.6", package="uu_pr", path="src/uu/pr" }
printenv = { optional=true, version="0.0.6", package="uu_printenv", path="src/uu/printenv" }
printf = { optional=true, version="0.0.6", package="uu_printf", path="src/uu/printf" }
ptx = { optional=true, version="0.0.6", package="uu_ptx", path="src/uu/ptx" }
Expand Down Expand Up @@ -334,6 +336,7 @@ yes = { optional=true, version="0.0.6", package="uu_yes", path="src/uu/yes"
#pin_cc = { version="1.0.61, < 1.0.62", package="cc" } ## cc v1.0.62 has compiler errors for MinRustV v1.32.0, requires 1.34 (for `std::str::split_ascii_whitespace()`)

[dev-dependencies]
chrono = "0.4.11"
conv = "0.3"
filetime = "0.2"
glob = "0.3.0"
Expand Down
2 changes: 2 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ PROGS := \
nproc \
od \
paste \
pr \
printenv \
printf \
ptx \
Expand Down Expand Up @@ -190,6 +191,7 @@ TEST_PROGS := \
paste \
pathchk \
pinky \
pr \
printf \
ptx \
pwd \
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,12 @@ To contribute to uutils, please see [CONTRIBUTING](CONTRIBUTING.md).
| Done | Semi-Done | To Do |
|-----------|-----------|--------|
| arch | cp | chcon |
| base32 | expr | dd |
| base64 | install | numfmt |
| basename | ls | pr |
| cat | more | runcon |
| chgrp | od (`--strings` and 128-bit data types missing) | stty |
| chmod | printf | |
| base32 | expr | csplit |
| base64 | install | dd |
| basename | ls | df |
| cat | more | numfmt |
| chgrp | od (`--strings` and 128-bit data types missing) | runcon |
| chmod | printf | stty |
| chown | sort | |
| chroot | split | |
| cksum | tail | |
Expand All @@ -352,7 +352,7 @@ To contribute to uutils, please see [CONTRIBUTING](CONTRIBUTING.md).
| cut | join | |
| dircolors | df | |
| dirname | tac | |
| du | | |
| du | pr | |
| echo | | |
| env | | |
| expand | | |
Expand Down
30 changes: 30 additions & 0 deletions src/uu/pr/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[package]
name = "uu_pr"
version = "0.0.6"
authors = ["uutils developers"]
license = "MIT"
description = "pr ~ (uutils) convert text files for printing"

homepage = "https://github.com/uutils/coreutils"
repository = "https://github.com/uutils/coreutils/tree/master/src/uu/pr"
keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"]
categories = ["command-line-utilities"]
edition = "2018"

[lib]
path = "src/pr.rs"

[dependencies]
uucore = { version=">=0.0.7", package="uucore", path="../../uucore", features=["utmpx", "entries"] }
uucore_procs = { version=">=0.0.5", package="uucore_procs", path="../../uucore_procs" }
getopts = "0.2.21"
time = "0.1.41"
# A higher version would cause a conflict with time
chrono = "0.4.19"
quick-error = "2.0.1"
itertools = "0.10"
regex = "1.0"

[[bin]]
name = "pr"
path = "src/main.rs"
1 change: 1 addition & 0 deletions src/uu/pr/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uucore_procs::main!(uu_pr); // spell-checker:ignore procs uucore

0 comments on commit badf7aa

Please sign in to comment.