Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
2d58ea5
pr: print 56 lines of content with 5 blank trailer and header lines
tilakpatidar Dec 8, 2018
2ee90ab
pr: print pr header with file last modified time, path and page number
tilakpatidar Dec 8, 2018
9111f16
pr: add -h to print header and -n to print line numbers
tilakpatidar Dec 8, 2018
7f87e42
pr: add support for multiple files
tilakpatidar Dec 9, 2018
e69c9ad
pr: read from stdin
tilakpatidar Dec 10, 2018
2d609b2
pr: add custom errors
tilakpatidar Dec 10, 2018
781d77e
pr: add support for -d option
tilakpatidar Dec 12, 2018
77d3d08
pr: show current time for stdin input
tilakpatidar Dec 12, 2018
1cf84a7
pr: refactor option flags into constants
tilakpatidar Dec 12, 2018
8c7cbf6
pr: throw error on reading from socket
tilakpatidar Dec 12, 2018
420a066
pr: add read buffer size and fix unused Result types
tilakpatidar Dec 12, 2018
c58ee96
pr: add long names for -d and -h
tilakpatidar Dec 12, 2018
9a3c572
pr: add --page option
tilakpatidar Dec 12, 2018
55043d7
pr: print only 28 lines if double spaced option is used
tilakpatidar Dec 12, 2018
9e023b8
pr: add -t option to not print header, trailer and -l to print line n…
tilakpatidar Dec 13, 2018
fd44477
pr: add -r option to suppress errors and -F to use form feed separator
tilakpatidar Dec 13, 2018
0098cfe
pr: add ColumnModeOptions and fix reading of input after page range i…
tilakpatidar Dec 14, 2018
2897039
pr: fix number of lines printed per page and short pages getting skipped
tilakpatidar Dec 14, 2018
f799d22
pr: add multi column printing
tilakpatidar Dec 15, 2018
629236b
pr: add first test
tilakpatidar Dec 15, 2018
64e2e1d
pr: remove parameter header and get_input_type
tilakpatidar Dec 15, 2018
afc58eb
pr: add tests for -n -h -d option
tilakpatidar Dec 15, 2018
88ec02a
pr: add suport for -n [char][width] and -N
tilakpatidar Dec 16, 2018
b742230
pr: fix page ranges
tilakpatidar Dec 16, 2018
b578bb6
pr: add test for -t -l -r option
tilakpatidar Dec 16, 2018
f367657
pr: print padded string for each column and handle tab issues
tilakpatidar Dec 17, 2018
5705ed1
pr: write pagination logic of reading file using iterators
tilakpatidar Dec 19, 2018
d9084a7
pr: implement across option and fix tests
tilakpatidar Dec 20, 2018
f497fb9
pr: read from stdin
tilakpatidar Dec 22, 2018
69371ce
pr: add tests for --column with across option
tilakpatidar Dec 22, 2018
dd07aed
pr: add column separator option
tilakpatidar Dec 22, 2018
5956894
pr: add -m and -o option
tilakpatidar Dec 24, 2018
5c6c524
pr: refactor and fmt fill_missing_lines and error checks
tilakpatidar Dec 29, 2018
847046f
pr: add +page and -column
tilakpatidar Dec 30, 2018
87227ad
pr: fix printing form feed
tilakpatidar Dec 30, 2018
8f9b322
pr: fix file not found in pr and mpr
tilakpatidar Dec 30, 2018
3be5dc6
pr: fix form feed
tilakpatidar Jan 4, 2019
4bf5b86
pr: add last page option in +page
tilakpatidar Jan 4, 2019
a4b7232
pr: add more tests for form feed and include page_width option W
tilakpatidar Jan 6, 2019
40e7f3d
pr: add -J and -S option
tilakpatidar Jan 6, 2019
aefc2eb
pr: reformat with rustfmt
tilakpatidar Jan 13, 2019
a7def93
pr: refactor common iterator between pr and mpr
tilakpatidar Jan 14, 2019
f87ada5
pr: refactor logic for -n <path>
tilakpatidar Jan 16, 2019
054c05d
pr: refactor get_lines_for_printing, write_columns, recreate_arguments
tilakpatidar Jan 17, 2019
837780c
pr: pre PR tasks
tilakpatidar Jan 21, 2019
75b35e6
pr: remove not required tests
tilakpatidar Apr 28, 2019
62fe688
pr: Fixes after rebasing
MaxSem Mar 26, 2021
bc2b385
pr: Fix a bunch of Clippy problems
MaxSem Mar 26, 2021
9e75926
pr: Remove commented out stuff from Cargo.toml
MaxSem Mar 26, 2021
844e318
Merge branch 'master' into pr
sylvestre Apr 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 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 @@ -330,6 +332,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
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,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 @@ -342,7 +342,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.4"
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/pinky"
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.11"
quick-error = "1.2.3"
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
Loading