Commit graph

1973 commits

Author SHA1 Message Date
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
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
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
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
tilakpatidar
7f87e42ad1 pr: add support for multiple files 2021-03-26 14:11:14 +03:00
tilakpatidar
9111f168aa pr: add -h to print header and -n to print line numbers
pr: Add -h to print custom header instead of file name

pr: Add -n to print line numbers
2021-03-26 14:11:14 +03:00
tilakpatidar
2ee90ab09a pr: print pr header with file last modified time, path and page number 2021-03-26 14:11:14 +03:00
tilakpatidar
2d58ea5f8b pr: print 56 lines of content with 5 blank trailer and header lines 2021-03-26 14:11:14 +03:00
Max Semenik
035f811dd0
Fix "panic message is not a string literal" warnings (#1915)
New in Rust 1.51.

Closes #1914
2021-03-26 11:09:16 +01:00
Terts Diepraam
23b70001a8
ls: version sort (#1898) 2021-03-25 20:24:53 +01:00
Sivachandran
52997b63fb
pathchk: move from getopts to clap (#1897) 2021-03-25 11:27:34 +01:00
Mekka
99da9ea6ec
Cleanup: Fix grammar in "cp" macro comments. (#1905)
Replaced "they if" with "if they" in the comments above the "prompt_yes" macro.
2021-03-25 10:36:48 +01:00
Yagiz Degirmenci
63317b3529
ptx: move from getopts to clap (#1893)
* ptx: move from getopts to clap

* chore: delete comment

* chore: fix some clippy warnings
2021-03-24 21:46:17 +01:00
Kevin Burke
4873c8a24b
mv: ensure line prints (#1890)
Previously this used `print` instead of `println`, and as a result the
prompt would never appear and the command would hang. The Rust docs
note this about print:

> Note that stdout is frequently line-buffered by default so it may be
> necessary to use io::stdout().flush() to ensure the output is emitted
> immediately.

Changing to `println` fixes the issue.

Fixes #1889.

Co-authored-by: Kevin Burke <kevin@burke.dev>
2021-03-23 21:49:35 +01:00
Alessandro Stoltenberg
b54f0b1ff2
echo: Refactored help message. (#1886) 2021-03-23 11:55:18 +01:00