Commit Graph
44 Commits
Author SHA1 Message Date
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
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
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 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 3c3d91cd51 Use 8-bit colors instead of 24-bit truecolor 2019-01-10 08:32:27 +01:00
Lily Ballard 7b7a0ff32d Get rid of the use of str.repeat()
This allocates a string. Instead we can (ab)use format specifiers to do
the repetitions for us.
2019-01-10 07:56:42 +01:00
Sebastian Thiel 2e403a2d11 Make clear we didn't accidentally forget to handle Results 2019-01-09 23:41:29 +01:00
David Peter b5704f660c Change variable name 2018-12-02 20:41:11 +01:00
PewZ 648e96dbaf add COLOR_OFFSET 2018-12-02 20:41:11 +01:00
PewZ 91a119f453 display input offset 2018-12-02 20:41:11 +01:00
sharkdp 22b544393b Enable ANSI support on Windows, closes #2 2018-11-21 19:36:20 +01:00
sharkdp 784c714bde Fix clippy warning 2018-11-06 21:21:40 +01:00
sharkdp 5cc9e0b602 Add -n/--length option 2018-11-06 20:18:23 +01:00
sharkdp 3761508571 Fix grid 2018-11-05 23:53:54 +01:00
sharkdp ea3fc0caee Add help text 2018-11-05 23:23:06 +01:00
sharkdp 01860bcaf0 Possibility to read from stdin 2018-11-05 23:21:54 +01:00
sharkdp 4b7c44c207 Fix for empty files 2018-11-05 23:13:34 +01:00
sharkdp 94980a817e Add grid 2018-11-05 23:08:45 +01:00
sharkdp a1bd8fb873 Use more distinguished characters 2018-11-05 22:51:25 +01:00
sharkdp e4e6c6b323 Colors! 2018-11-05 22:40:43 +01:00
sharkdp 1443d2d7bb Fully-fledged HEX hexdump clone 2018-11-05 22:00:11 +01:00
sharkdp 6d6ee6fb24 Use a lock on stdout 2018-11-05 21:38:29 +01:00
sharkdp abd52ce7de Initial working version of a hex viewer 2018-11-05 21:30:39 +01:00