Commit graph

4873 commits

Author SHA1 Message Date
Antonio Gurgel
35675fdfe7
install: implement -C / --compare (#1811)
* install: implement `-C` / `--compare`

GNU coreutils [1] checks the following: whether
- either file is nonexistent,
- there's a sticky bit or set[ug]id bit in play,
- either file isn't a regular file,
- the sizes of both files mismatch,
- the destination file's owner differs from intended, or
- the contents of both files mismatch.

[1] https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/install.c?h=v8.32#n174

* Add test: non-regular files

* Forgot a #[test]

* Give up on non-regular file test

* `cargo fmt` install.rs
2021-03-27 09:18:47 +01:00
Jan Scheer
3ae714e88c
tests/tee: implemented tests for tee (#1804)
These tests are ported from `https://github.com/coreutils/coreutils/tests/misc/tee.sh`.
2021-03-27 09:16:45 +01:00
Rein F
3ca21940f8
nl: move from getopts to clap (#1921) 2021-03-27 08:55:31 +01:00
Terts Diepraam
955c547adf
ls: overrideable -n option (#1917) 2021-03-26 19:12:01 +01:00
Yagiz Degirmenci
83f8140aaf
cat: move cat to clap (#1910) 2021-03-26 17:26:37 +01:00
Max Semenik
9e759267ee pr: Remove commented out stuff from Cargo.toml 2021-03-26 18:19:52 +03:00
Max Semenik
bc2b385744 pr: Fix a bunch of Clippy problems 2021-03-26 17:57:21 +03:00
Max Semenik
62fe68850e pr: Fixes after rebasing
Only the minimum needed to:
* Make everything compile without warnings
* Move files according to the new project structure
* Make tests pass
2021-03-26 17:57:19 +03:00
tilakpatidar
75b35e6002 pr: remove not required tests 2021-03-26 14:11:15 +03:00
tilakpatidar
837780c325 pr: pre PR tasks 2021-03-26 14:11:15 +03:00
tilakpatidar
054c05d5d8 pr: refactor get_lines_for_printing, write_columns, recreate_arguments
pr: extract recreate_arguments

pr: refactor get_line_for_printing

pr: refactor get_lines_for_printing

pr: refactor fetch_indexes generate for write_columns

pr: refactor write_columns

pr: refactor write_columns
2021-03-26 14:11:15 +03:00
tilakpatidar
f87ada5a11 pr: refactor logic for -n <path> 2021-03-26 14:11:15 +03:00
tilakpatidar
a7def9386b pr: refactor common iterator between pr and mpr
pr: refactor common iterator between pr and mpr

pr: remove fill lines in mpr
2021-03-26 14:11:15 +03:00
tilakpatidar
aefc2eb540 pr: reformat with rustfmt
pr: refactor batching of pages in pr
2021-03-26 14:11:15 +03:00
tilakpatidar
40e7f3d900 pr: add -J and -S option
pr: add -J option

pr: add -S option
2021-03-26 14:11:15 +03:00
tilakpatidar
a4b723233a pr: add more tests for form feed and include page_width option W 2021-03-26 14:11:15 +03:00
tilakpatidar
4bf5b86cde pr: add last page option in +page 2021-03-26 14:11:15 +03:00
tilakpatidar
3be5dc6923 pr: fix form feed
pr: fix form feed

pr: Rustfmt

pr: add test for ff and -l option
2021-03-26 14:11:15 +03:00
Tilak Patidar
8f9b322897 pr: fix file not found in pr and mpr 2021-03-26 14:11:15 +03:00
Tilak Patidar
87227addc1 pr: fix printing form feed 2021-03-26 14:11:14 +03:00
Tilak Patidar
847046f3de pr: add +page and -column 2021-03-26 14:11:14 +03:00
Tilak Patidar
5c6c524334 pr: refactor and fmt fill_missing_lines and error checks
pr: Remove unwanted brancing in fill_missing_lines

pr: Remove unnecessary error check

pr: Rename key to group_key in FileLine

pr: Reformat test_pr with rustfmt
2021-03-26 14:11:14 +03:00
Tilak Patidar
5956894d00 pr: add -m and -o option
pr: Add -o option
2021-03-26 14:11:14 +03:00
Tilak Patidar
dd07aed4d1 pr: add column separator option 2021-03-26 14:11:14 +03:00
Tilak Patidar
69371ce3ce pr: add tests for --column with across option 2021-03-26 14:11:14 +03:00
Tilak Patidar
f497fb9d88 pr: read from stdin 2021-03-26 14:11:14 +03:00
Tilak Patidar
d9084a7399 pr: implement across option and fix tests 2021-03-26 14:11:14 +03:00
Tilak Patidar
5705ed142f pr: write pagination logic of reading file using iterators 2021-03-26 14:11:14 +03:00
Tilak Patidar
f3676573b5 pr: print padded string for each column and handle tab issues
pr: Print fixed padded string for each column

pr: Fix display length vs str length due to tabs
2021-03-26 14:11:14 +03:00
Tilak Patidar
b578bb6563 pr: add test for -t -l -r option
pr: Add test for -l option

pr: Add test for -r suppress error option
2021-03-26 14:11:14 +03:00
Tilak Patidar
b742230dbb pr: fix page ranges
pr: Fix page ranges
2021-03-26 14:11:14 +03:00
Tilak Patidar
88ec02a61c pr: add suport for -n [char][width] and -N
pr: Fix long name for -n

pr: Add -N first line number option

pr: Add -n[char][width] support
2021-03-26 14:11:14 +03:00
Tilak Patidar
afc58eb6ea pr: add tests for -n -h -d option
pr: Add test for -h option

pr: Add test for -d option
2021-03-26 14:11:14 +03:00
tilakpatidar
64e2e1dbac pr: remove parameter header and get_input_type
pr: Remove parameter header from build_options

pr: Remove unnecessary get_input_type
2021-03-26 14:11:14 +03:00
tilakpatidar
629236bd39 pr: add first test 2021-03-26 14:11:14 +03:00
tilakpatidar
f799d22b7d pr: add multi column printing 2021-03-26 14:11:14 +03:00
tilakpatidar
2897039000 pr: fix number of lines printed per page and short pages getting skipped
pr: Fix number of lines printed per page

pr: Fix first short page getting skipped due to page range
2021-03-26 14:11:14 +03:00
tilakpatidar
0098cfe5b7 pr: add ColumnModeOptions and fix reading of input after page range is finished 2021-03-26 14:11:14 +03:00
tilakpatidar
fd4447785b pr: add -r option to suppress errors and -F to use form feed separator
pr: Add -F to print line feed character for page separator
2021-03-26 14:11:14 +03:00
tilakpatidar
9e023b8a91 pr: add -t option to not print header, trailer and -l to print line numbers
pr: Add -l option set number of lines

pr: Refactor opts
2021-03-26 14:11:14 +03:00
tilakpatidar
55043d7a15 pr: print only 28 lines if double spaced option is used 2021-03-26 14:11:14 +03:00
tilakpatidar
9a3c572de8 pr: add --page option 2021-03-26 14:11:14 +03:00
tilakpatidar
c58ee96abf pr: add long names for -d and -h 2021-03-26 14:11:14 +03:00
tilakpatidar
420a066312 pr: add read buffer size and fix unused Result types 2021-03-26 14:11:14 +03:00
tilakpatidar
8c7cbf65a5 pr: throw error on reading from socket 2021-03-26 14:11:14 +03:00
tilakpatidar
1cf84a7305 pr: refactor option flags into constants 2021-03-26 14:11:14 +03:00
tilakpatidar
77d3d08f0b pr: show current time for stdin input 2021-03-26 14:11:14 +03:00
tilakpatidar
781d77eb3c pr: add support for -d option 2021-03-26 14:11:14 +03:00
tilakpatidar
2d609b2cd1 pr: add custom errors
pr: code refactoring for references
2021-03-26 14:11:14 +03:00
tilakpatidar
e69c9ada34 pr: read from stdin 2021-03-26 14:11:14 +03:00