Commit Graph
101 Commits
Author SHA1 Message Date
sharkdp 161ddd7ea1 Only print to buffer if line is not squeezed 2019-10-08 20:09:10 +02:00
David Peter 53110bac6f Add sponsor button as an experiment :-) 2019-10-08 18:35:09 +02:00
Tom Milligan d64053771c hexyl: add display offset option 2019-10-07 23:36:53 +02:00
Noah AL-Shihabi 23f199ffbd Remove additional space found on short input 2019-10-01 20:23:57 +02:00
Tom Milligan 175847787d fix crate import for travis tests 2019-07-17 19:31:37 +02:00
Tom Milligan 622a084ea6 run: factor out mainloop and add tests 2019-07-17 19:31:37 +02:00
Tom Milligan 4c48eedb18 printer: accept any Write as output 2019-07-17 19:31:37 +02:00
Tom Milligan ca8970b5cc lib: main and run in bin, everything else in lib 2019-07-17 19:31:37 +02:00
Tom Milligan fb49b633b2 lib: created, moved bin 2019-07-17 19:31:37 +02:00
sharkdp 82c34fe39b Bump version v0.5.1 2019-05-30 15:35:21 +02:00
Armin Widegreen c4028bb213 Consider color when printing squeeze indicator
When color option has been set to never, the squeeze indicator
character asterisk '*' should not be printed in color.

Fixes #63
2019-05-30 15:29:37 +02:00
Armin Widegreen def066ff92 Fixes squeeze state-machine for first/last char
Consider equality for first and last character of a line.

If the first or last character of a line is not equal to previous character,
the state machine should be set back to probe as the line should not be
squeezed.

The unit tests has been expanded for testing the use case described in #62.
Further the body of all unit tests has been simplified.

Fixes #62
2019-05-30 15:29:37 +02:00
sharkdp 17c2c61bad Update dependencies, closes #61 2019-05-28 21:37:33 +02:00
sharkdp 2ad15413b9 Bump version v0.5.0 2019-04-13 18:39:34 +02:00
sharkdp 710c86f6a1 Update dependencies 2019-04-13 18:38:50 +02:00
sharkdp a2ea80e960 Use u8/usize directly without references 2019-04-13 18:32:59 +02:00
sharkdp 3390bedee9 Update to Rust 2018 2019-04-13 18:27:21 +02:00
Armin Widegreen 6978f7a277 Adds squeeze support
The squeeze feature is implement as for hexdump. Reoccurring lines will
be squeezed together and visualized with an asterisk. Further hexyl
received an additional command line argument '-v|--no-squeezing' to
disable squeezing. Squeezing is enabled by default.

If the squeezing goes until the end of the input data, an empty line
with address next to last line will be printed to indicate the highest
address (again similar to hexdump).
2019-04-13 18:19:15 +02:00
sharkdp 2c7c857ccc Fix left border 2019-04-08 22:52:06 +02:00
sharkdp 55adb2db2c Make sure to always print the header 2019-04-08 21:34:32 +02:00
sharkdp 3a62809c8c Use separate struct for border elements 2019-04-08 21:23:09 +02:00
sharkdp 7cc0b51537 cargo fmt 2019-04-08 21:20:45 +02:00
sharkdp 8363e3f37e Fix typo 2019-04-08 21:16:06 +02:00
Dominik Menke 07c222947d Implement various --border styles 2019-04-08 20:26:30 +02:00
David Peter 2566d7b9f9 Updated Arch linux instructions
closes #56
2019-03-16 20:42:38 +01:00
Mikaela Szekely 8bd7677c9b Bump version number to Rust 1.30.0 2019-03-09 07:41:52 +01:00
Mikaela Szekely 6a848b14f8 Allow passing length in hex with 0x notation 2019-03-09 07:41:52 +01:00
selfup c6c4dd416e unhide --bytes/-c - describe alias to --length/-n 2019-02-06 07:35:12 +01:00
Matthew Ziter f918bfb911 Set printed to true after printing header 2019-02-06 07:31:33 +01:00
Matthew Ziter 10e3535999 Fixes #47 with header printing before data in some scenarios 2019-02-06 07:31:33 +01:00
selfup 8725f8cd25 Refactor Some(length) and change --c/-c to --bytes/-c 2019-02-05 23:15:43 +01:00
selfup c8e65d7528 Add c long/c short and hide values 2019-02-05 23:15:43 +01:00
selfup 170573fad0 Add --c alias to length cmd 2019-02-05 23:15:43 +01:00
Lily Ballard 880807619f Add Nix install instructions to README.md 2019-01-14 22:38:48 +01:00
sharkdp 7e46a5d788 Bump version v0.4.0 2019-01-14 10:51:32 +01:00
sharkdp 19030470f9 Add proper Ctrl-C handling 2019-01-14 10:40:04 +01:00
sharkdp b27ab61608 Fix behavior on broken pipe 2019-01-14 10:17:14 +01:00
sharkdp 39a83021dc Use 16 colors instead of 256 2019-01-14 09:53:33 +01:00
sharkdp f6f41e76aa Use --color=always/auto/never instead of --no-color 2019-01-14 09:14:47 +01:00
Bennett Hardwick 74861353fa Add --no-color flag to disable ANSI sequences 2019-01-14 09:14:47 +01:00
Arnav Borborah 78d8cc516f Change exit code for help and version messages to 0 2019-01-13 18:35:15 +01:00
arnavb11 faebee7b8c Move duplicate code out of conditional 2019-01-13 18:03:07 +01:00
arnavb11 92c974d066 Handle clap errors and other errors separately 2019-01-13 18:03:07 +01:00
arnavb11 866feb2966 Refactor error handling into a if-let 2019-01-13 18:03:07 +01:00
arnavb11 952fff0ee4 Use instead of for consistency 2019-01-13 18:03:07 +01:00
Lily Ballard 1619cd5afe Bump the buffer size to 256 bytes
On my machine this produces an 11% speedup (benchmarked reading a 1.3MB
file from disk). Higher buffer sizes don't seem to make a difference.
2019-01-13 17:35:51 +01:00
Lily Ballard 20694bb628 Write lines into an in-memory buffer before printing to stdout
Running them through an in-memory buffer first produces a 25% speedup
(when tested against a 1.3MB file).
2019-01-13 17:35:51 +01:00
sharkdp 98311282e5 Fix #25 v0.3.1 2019-01-10 09:03:39 +01:00
Lily Ballard afb6669477 Replace all uses of format!()
Previously we were allocating 2 strings per byte, plus another for the
offset. Instead we can just write all this directly to stdout.

Also replace the calculation of the ANSI escape code for every single
byte. This produces a significant speedup.
2019-01-10 09:00:44 +01:00
sharkdp 0dad8bf481 Bump version 2019-01-10 08:36:45 +01:00